export type OnboardingPersona = 'company_admin' | 'department_head' | 'user';

export type DepartmentHeadWizardStep =
  | 'portal'
  | 'invite'
  | 'workflow'
  | 'notifications'
  | 'go_live';

export type CompanyAdminWizardStep =
  | 'departments'
  | 'heads'
  | 'settings'
  | 'users'
  | 'review';

export type UserWizardStep = 'welcome' | 'department' | 'ticket' | 'track';

export type OnboardingWizardStep =
  | DepartmentHeadWizardStep
  | CompanyAdminWizardStep
  | UserWizardStep;

export interface ChecklistItem {
  key: string;
  completed: boolean;
  route: string | null;
  action: string;
}

export interface ChecklistProgress {
  persona: OnboardingPersona;
  department_id: string | null;
  completed: number;
  total: number;
  items: ChecklistItem[];
}

export interface OnboardingStatus {
  persona: OnboardingPersona;
  department_id: string | null;
  onboarding_completed_at: string | null;
  onboarding_step: string | null;
  dismissed_tours: string[];
  should_show_wizard: boolean;
  checklist: ChecklistProgress;
}

export interface TourStep {
  id: string;
  target: string;
  titleKey: string;
  bodyKey: string;
  placement?: 'top' | 'bottom' | 'left' | 'right';
}

export interface TourDefinition {
  id: string;
  routePattern: RegExp;
  steps: TourStep[];
}

export type CategoryTemplateId = 'it_support' | 'hr_requests' | 'facilities' | 'finance' | 'custom';

export interface CategoryTemplate {
  id: CategoryTemplateId;
  categories: Array<{ name_en: string; name_ar: string }>;
}
