import { getAdminClasses, getTeacherOptions } from "@/modules/classes/data-access"
import { AdminClassesClient } from "@/modules/classes/components/admin-classes-view"

export const dynamic = "force-dynamic"

export default async function AdminSchoolClassesPage() {
  const [classes, teachers] = await Promise.all([getAdminClasses(), getTeacherOptions()])

  return (
    <div className="flex h-full flex-col space-y-8 p-8">
      <div className="space-y-1">
        <h2 className="text-2xl font-bold tracking-tight">Classes</h2>
        <p className="text-muted-foreground">Manage classes and assign teachers.</p>
      </div>
      <AdminClassesClient classes={classes} teachers={teachers} />
    </div>
  )
}

