import { getServerSession } from "next-auth/next";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { redirect } from "next/navigation";
import { ManagementTabs } from "@/components/management/management-tabs";

export const metadata = {
  title: "Enkun",
};

export default async function ManagementPage() {
  const session = await getServerSession(authOptions);

  if (!session) {
    redirect("/signin");
  }

  return (
    <div className='min-h-screen bg-white'>
      <div className='container mx-auto py-10'>
        <ManagementTabs userRole={session.user.role || []} />
      </div>
    </div>
  );
} 