<template>
	<div class="magic-rocketmq-info">
		<form>
			<label>{{ $i('message.enable') }}</label>
			<magic-checkbox v-model:value="info.enabled" />
			<label>{{ $i('rocketmq.form.topic') }}</label>
			<magic-input v-model:value="info.topic" :placeholder="$i('rocketmq.form.placeholder.topic')" width="250px"/>
      <label>{{ $i('rocketmq.form.tag') }}</label>
      <magic-input v-model:value="info.tag" :placeholder="$i('rocketmq.form.placeholder.tag')" width="250px"/>
			<label>{{ $i('rocketmq.form.name') }}</label>
			<magic-input v-model:value="info.name" :placeholder="$i('rocketmq.form.placeholder.name')" width="250px"/>
			<label>{{ $i('rocketmq.form.path') }}</label>
			<magic-input v-model:value="info.path" :placeholder="$i('rocketmq.form.placeholder.path')" width="auto" style="flex:1"/>
		</form>
		<div style="flex:1;padding-top:5px;">
			<magic-textarea v-model:value="info.description" :placeholder="$i('rocketmq.form.placeholder.description')"/>
		</div>
	</div>
</template>
<script setup>
import { inject } from 'vue'
const $i = inject('i18n.format')
const info = inject('info')
</script>
<style scoped>
.magic-rocketmq-info{
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 5px;
}
.magic-rocketmq-info form{
	display: flex;
}
.magic-rocketmq-info form label{
	display: inline-block;
	width: 100px;
	height: var(--magic-input-height);
	line-height: var(--magic-input-height);
	font-weight: 400;
	text-align: right;
	padding: 0 5px;
}
.magic-rocketmq-info form :deep(.magic-checkbox){
	width: 22px;
	height: 22px;
}
.magic-rocketmq-info form :deep(.magic-textarea){
	margin: 5px;
}
</style>
