import { useAuth } from '../context/AuthContext'

export function AdminDashboardPage() {
    const { user, logout } = useAuth()

    return (
        <div className="min-h-screen bg-gray-100 p-8">
            <div className="mx-auto max-w-7xl">
                <div className="flex items-center justify-between rounded-lg bg-white p-6 shadow">
                    <div>
                        <h1 className="text-2xl font-bold text-gray-900">Painel do Administrador</h1>
                        <p className="text-gray-600">Bem-vindo, {user?.name} (Admin)</p>
                    </div>
                    <button
                        onClick={logout}
                        className="rounded bg-red-600 px-4 py-2 font-bold text-white hover:bg-red-700"
                    >
                        Sair
                    </button>
                </div>

                <div className="mt-8 grid gap-6 md:grid-cols-2 lg:grid-cols-3">
                    <div className="rounded-lg bg-white p-6 shadow">
                        <h3 className="text-lg font-bold">Resumo Geral</h3>
                        <p className="text-gray-600 mt-2">Visão geral do sistema.</p>
                    </div>
                    {/* Add more admin widgets here */}
                </div>
            </div>
        </div>
    )
}
