<script setup>
// Copyright 2024 FlexCDN root@flexcdn.cn. All rights reserved. Official site: https://flexcdn.cn .

import ctxRef from "@/utils/ctx_ref.js"
import Context from "./update.js"
import Menu from "@/views/servers/groups/group/@menu.vue";
import TInputText from "@/components/ui/TInputText.vue";
import SubmitButton from "@/components/form/SubmitButton.vue";
import PostForm from "@/components/form/PostForm.vue";
import DefinitionTable from "@/components/common/DefinitionTable.vue";

const ctx = ctxRef(new Context())

</script>

<template>
	<Menu :ctx="ctx" activeTab="update"></Menu>

	<PostForm action="$" @success="ctx.success">
		<input type="hidden" name="groupId" :value="ctx.group.id"/>
		<DefinitionTable>
			<tbody>
			<tr>
				<td class="title">分组名称 *</td>
				<td>
					<TInputText name="name" maxlength="50" autofocus v-model="ctx.group.name" class="w-full"/>
				</td>
			</tr>
			</tbody>
		</DefinitionTable>
		<SubmitButton></SubmitButton>
	</PostForm>
</template>

<style lang="postcss" scoped>
</style>