import { auth } from '@/auth';
import PageContainer from '@/components/layout/page-container';
import { SetupWizard } from '@/features/setup/components/setup-wizard';

export const metadata = {
  title: 'Dashboard: Administration Setup'
};

export default async function AdministrationSetupPage() {
  const session = await auth();
  const canAccessSetup = session?.user?.systemRole === 'super_admin';

  return (
    <PageContainer
      pageTitle='Administration Setup Wizard'
      pageDescription='Preview setup CSV files from SETUP_IMPORT_DIR, run the import, and verify the configured system.'
      access={canAccessSetup}
      accessFallback={
        <div className='rounded-lg border border-dashed p-8 text-center text-muted-foreground'>
          Setup administration requires a super admin account.
        </div>
      }
    >
      <SetupWizard />
    </PageContainer>
  );
}
