import { DeadlineMetrics } from '@/services/analytics/deadline-analytics';
import { DeadlineRiskCard } from './DeadlineRiskCard';
import { CriticalDeadlinesCard } from './CriticalDeadlinesCard';
import { DeadlineSummaryCard } from './DeadlineSummaryCard';
import { Emoji } from '@/components/ui/Emoji';

interface DeadlineOverviewProps {
  metrics: DeadlineMetrics;
}

export function DeadlineOverview({ metrics }: DeadlineOverviewProps) {
  return (
    <div className="space-y-6">
      {/* Titre de section */}
      <div className="flex items-center justify-between">
        <h2 className="text-2xl font-bold">
          <Emoji emoji="🚨" /> Échéances Critiques
        </h2>
        <div className="text-sm text-[var(--muted-foreground)]">
          Surveillance temps réel
        </div>
      </div>

      {/* Cards principales */}
      <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
        <DeadlineRiskCard metrics={metrics} />
        <DeadlineSummaryCard metrics={metrics} />
        <CriticalDeadlinesCard
          overdue={metrics.overdue}
          critical={metrics.critical}
          warning={metrics.warning}
          disableHover={true}
        />
      </div>
    </div>
  );
}
