import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from '@/components/ui/card';
import { AdvanceRequestForm } from '@/components/employee/advance-request-form';
import DashboardLayout from '@/components/layout/dashboard-layout';
import { getTranslations, getCurrentLocale } from '@/lib/i18n';

export default async function AdvanceRequestPage() {
  const locale = await getCurrentLocale();
  const t = getTranslations(locale).AdvanceRequest;
  const tGlobal = getTranslations(locale).Global;

  return (
    <DashboardLayout>
        <div className="mx-auto grid w-full max-w-6xl gap-2">
            <h1 className="text-3xl font-semibold">{t.title}</h1>
            <Card>
                <CardHeader>
                <CardTitle>{t.cardTitle}</CardTitle>
                <CardDescription>
                    {t.cardDescription}
                </CardDescription>
                </CardHeader>
                <CardContent>
                <AdvanceRequestForm t={t} tGlobal={tGlobal} />
                </CardContent>
            </Card>
        </div>
    </DashboardLayout>
  );
}

    
