import type { Metadata } from "next"
import type { JSX } from "react"

import { requirePermission } from "@/shared/lib/auth-guard"
import { Permissions } from "@/shared/types/permissions"
import { AdminSettingsView } from "@/modules/settings/components/admin-settings-view"

export const metadata: Metadata = {
  title: "系统设置 - Next_Edu",
  description: "管理系统基础信息与运行参数",
}

export const dynamic = "force-dynamic"

export default async function AdminSettingsPage(): Promise<JSX.Element> {
  await requirePermission(Permissions.SETTINGS_ADMIN)
  return (
    <div className="flex h-full flex-col p-8">
      <AdminSettingsView />
    </div>
  )
}
