import type {
  DirectorDashboardTimeRange,
  DirectorQuickActionConfig,
} from '@/shared/constants/directorDashboard';
import type { ModuleId } from '@/shared/types/app';
import type { SafetyQuizResultDto } from '@/shared/types/safetyQuiz';

export type DirectorDashboardTrend = 'up' | 'down';
export type DirectorDashboardRiskSeverity = 'high' | 'medium' | 'low';
export type DirectorOverviewIconId = 'clock' | 'shield' | 'eye' | 'users';
export type DirectorOverviewTone = 'orange' | 'blue' | 'amber' | 'purple';
export type DirectorFrameSectionLetter = 'F' | 'R' | 'A' | 'M' | 'E';

export interface DirectorOverviewCard {
  readonly label: string;
  readonly value: string;
  readonly change: string;
  readonly trend: DirectorDashboardTrend;
  readonly iconId: DirectorOverviewIconId;
  readonly tone: DirectorOverviewTone;
  readonly module: ModuleId;
}

export interface DirectorRiskArea {
  readonly issue: string;
  readonly severity: DirectorDashboardRiskSeverity;
  readonly module: ModuleId;
}

export interface DirectorFrameSectionPreview {
  readonly letter: DirectorFrameSectionLetter;
  readonly text: string;
}

export interface DirectorFramePreview {
  readonly id: string;
  readonly week: string;
  readonly sections: readonly DirectorFrameSectionPreview[];
}

export interface DirectorDashboardPage {
  readonly timeRange: DirectorDashboardTimeRange;
  readonly overviewCards: readonly DirectorOverviewCard[];
  readonly riskAreas: readonly DirectorRiskArea[];
  readonly framePreviews: readonly DirectorFramePreview[];
  readonly quickActions: readonly DirectorQuickActionConfig[];
  readonly quizResults: readonly SafetyQuizResultDto[];
  readonly isLoading: boolean;
  readonly error: unknown;
  readonly setTimeRange: (timeRange: DirectorDashboardTimeRange) => void;
}
