<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 "./index.js"
import ServerSettingLayout from "@/layouts/ServerSettingLayout.vue";
import SubmitButton from "@/components/form/SubmitButton.vue";
import PostForm from "@/components/form/PostForm.vue";
import HTTPCacheConfigBox from "@/components/server/HTTPCacheConfigBox.vue";
import Menu from "./@menu.vue"

const ctx = ctxRef(new Context())

</script>

<template>
	<ServerSettingLayout :ctx="ctx">
		<Menu :ctx="ctx" active-tab="index"></Menu>
		<PostForm action="$" @success="ctx.success">
			<input type="hidden" name="webId" :value="ctx.webId"/>
			<HTTPCacheConfigBox :v-cache-config="ctx.cacheConfig" :v-web-id="ctx.webId" :v-cache-policy="ctx.cachePolicy"></HTTPCacheConfigBox>
			<SubmitButton class="mt-4"></SubmitButton>
		</PostForm>
	</ServerSettingLayout>
</template>

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