import type { ModuleId } from '@/shared/types/app';

export const DIRECTOR_DASHBOARD_TIME_RANGES = ['week', 'month', 'quarter'] as const;

export type DirectorDashboardTimeRange = typeof DIRECTOR_DASHBOARD_TIME_RANGES[number];

export const DIRECTOR_DASHBOARD_FRAME_PREVIEW_LIMIT = 3;
export const DIRECTOR_DASHBOARD_TEXT_PREVIEW_LENGTH = 60;
export const DIRECTOR_DASHBOARD_COMPLETION_TREND_THRESHOLD = 50;
export const DIRECTOR_DASHBOARD_HIGH_INCOMPLETE_STAFF_THRESHOLD = 3;
export const DIRECTOR_DASHBOARD_HIGH_ABSENCE_THRESHOLD = 3;

export type DirectorQuickActionTone =
  | 'indigo'
  | 'amber'
  | 'blue'
  | 'orange'
  | 'rose'
  | 'red';

export type DirectorQuickActionIconId = 'clipboard';

export interface DirectorQuickActionConfig {
  readonly label: string;
  readonly module: ModuleId;
  readonly tone: DirectorQuickActionTone;
  readonly iconId?: DirectorQuickActionIconId;
}

export const DIRECTOR_DASHBOARD_QUICK_ACTIONS: readonly DirectorQuickActionConfig[] = [
  {
    label: 'Walk-Through Check-In',
    module: 'walkthrough',
    tone: 'indigo',
    iconId: 'clipboard',
  },
  {
    label: 'Create F.R.A.M.E. Entry',
    module: 'frame',
    tone: 'amber',
  },
  {
    label: 'View QBS Compliance',
    module: 'qbs',
    tone: 'blue',
  },
  {
    label: 'Check Attendance',
    module: 'attendance',
    tone: 'orange',
  },
  {
    label: 'Schedule Alert',
    module: 'internal-comm',
    tone: 'rose',
  },
  {
    label: 'Review Safety',
    module: 'safety',
    tone: 'red',
  },
];
