import { Head, Link } from '@inertiajs/react';
import { ShieldAlert, ArrowLeft, Home } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { dashboard } from '@/routes';

export default function Error403() {
    return (
        <>
            <Head title="Accès refusé" />
            <div className="flex min-h-[80vh] items-center justify-center p-4">
                <div className="flex w-full max-w-md flex-col items-center space-y-6 text-center">
                    <div className="flex h-24 w-24 items-center justify-center rounded-full bg-destructive/10 text-destructive">
                        <ShieldAlert className="h-12 w-12" />
                    </div>

                    <div className="space-y-2">
                        <h1 className="text-4xl font-bold tracking-tight text-foreground">
                            Erreur 403
                        </h1>
                        <h2 className="text-xl font-semibold text-muted-foreground">
                            Accès refusé
                        </h2>
                    </div>

                    <p className="text-muted-foreground">
                        Vous n'avez pas les permissions nécessaires pour accéder
                        à cette page ou effectuer cette action. Veuillez
                        contacter votre administrateur si vous pensez qu'il
                        s'agit d'une erreur.
                    </p>

                    <div className="flex items-center gap-4 pt-4">
                        <Button
                            variant="outline"
                            onClick={() => window.history.back()}
                        >
                            <ArrowLeft className="mr-2 h-4 w-4" />
                            Retour
                        </Button>
                        <Button asChild>
                            <Link href={dashboard()}>
                                <Home className="mr-2 h-4 w-4" />
                                Tableau de bord
                            </Link>
                        </Button>
                    </div>
                </div>
            </div>
        </>
    );
}
