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

export type DashboardQuickActionIconId =
  | 'book'
  | 'timer'
  | 'shield'
  | 'heart'
  | 'file'
  | 'alert';

export interface DashboardQuickAction {
  readonly label: string;
  readonly iconId: DashboardQuickActionIconId;
  readonly module: ModuleId;
  readonly color: string;
  readonly shadow: string;
  readonly hiddenForRoles?: readonly UserRole[];
}

export interface DashboardZoneOption {
  readonly color: ZoneColor;
  readonly label: string;
  readonly description: string;
  readonly bgClass: string;
  readonly borderClass: string;
  readonly textClass: string;
  readonly ringClass: string;
}

export const DASHBOARD_UPCOMING_EVENTS_LIMIT = 4;

export const DASHBOARD_ZONE_OPTIONS: readonly DashboardZoneOption[] = [
  {
    color: 'blue',
    label: 'Blue',
    description: 'Low energy',
    bgClass: 'bg-blue-500/15 hover:bg-blue-500/25',
    borderClass: 'border-blue-500/30',
    textClass: 'text-blue-400',
    ringClass: 'ring-blue-500/40',
  },
  {
    color: 'green',
    label: 'Green',
    description: 'Ready to go',
    bgClass: 'bg-emerald-500/15 hover:bg-emerald-500/25',
    borderClass: 'border-emerald-500/30',
    textClass: 'text-emerald-400',
    ringClass: 'ring-emerald-500/40',
  },
  {
    color: 'yellow',
    label: 'Yellow',
    description: 'Heightened',
    bgClass: 'bg-yellow-500/15 hover:bg-yellow-500/25',
    borderClass: 'border-yellow-500/30',
    textClass: 'text-yellow-400',
    ringClass: 'ring-yellow-500/40',
  },
  {
    color: 'red',
    label: 'Red',
    description: 'Intense',
    bgClass: 'bg-red-500/15 hover:bg-red-500/25',
    borderClass: 'border-red-500/30',
    textClass: 'text-red-400',
    ringClass: 'ring-red-500/40',
  },
];

export const DASHBOARD_QUICK_ACTIONS: readonly DashboardQuickAction[] = [
  {
    label: 'Classroom Tips',
    iconId: 'book',
    module: 'classroom',
    color: 'from-emerald-500 to-emerald-600',
    shadow: 'shadow-emerald-500/30',
    hiddenForRoles: ['office_manager'],
  },
  {
    label: 'Class Timer',
    iconId: 'timer',
    module: 'timer',
    color: 'from-cyan-500 to-blue-600',
    shadow: 'shadow-cyan-500/30',
  },
  {
    label: 'De-escalation',
    iconId: 'shield',
    module: 'qbs',
    color: 'from-blue-500 to-blue-600',
    shadow: 'shadow-blue-500/30',
  },
  {
    label: 'Zones',
    iconId: 'heart',
    module: 'zones',
    color: 'from-teal-500 to-teal-600',
    shadow: 'shadow-teal-500/30',
  },
  {
    label: 'Handbook',
    iconId: 'file',
    module: 'handbook',
    color: 'from-slate-500 to-slate-600',
    shadow: 'shadow-slate-500/30',
  },
  {
    label: 'Safety Protocols',
    iconId: 'alert',
    module: 'safety',
    color: 'from-red-500 to-red-600',
    shadow: 'shadow-red-500/30',
  },
];
