import PageHeader from "@/components/ui/PageHeader";
import AccessWidget from "@/components/widgets/AccessWidget";
import InformationWidget from "@/components/widgets/InformationWidget";
import { useUserInformations } from "@/hooks/useUserInformations";

export default function AccountSettings() {
  const { user, company, isLoading, error } = useUserInformations();
  return (
    <div className="font-sans relative min-h-[calc(100vh-4rem)]">
      {/* Contenu Principal */}
      <main className="max-w-7xl mx-auto px-8 sm:px-8 space-y-6 m-4">
        {/* Header */}
        <PageHeader
          title="Paramètres du compte"
          description="Gestion de la sécurité et informations contractuelles" />
        <div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
          {/* Colonne 1 : Sécurité */}
          <AccessWidget
            user={user}
            isLoading={isLoading}
            error={error}
          />
          {/* Colonne 2 : Organisation & Contrat */}
          <InformationWidget
            user={user}
            company={company}
            isLoading={isLoading}
            error={error}
          />
        </div>
      </main>
    </div>
  );
}