// Breakpoints
export const BREAKPOINTS = {
  mobile: 576,
  tablet: 768,
  desktop: 992,
  wide: 1200,
  ultra: 1400,
} as const;

// Layout
export const LAYOUT = {
  sidebarWidth: 260,
  sidebarCollapsedWidth: 64,
  topbarHeight: 56,
} as const;

// Pagination
export const PAGINATION = {
  defaultPageSize: 20,
  pageSizeOptions: [10, 20, 50, 100],
} as const;

// Toast
export const TOAST = {
  defaultLife: 3000,
  errorLife: 5000,
} as const;

// Date formats
export const DATE_FORMAT = {
  display: 'YYYY-MM-DD',
  api: 'YYYY-MM-DD',
  datetime: 'YYYY-MM-DD HH:mm',
  weekStart: 1,
} as const;

// Timesheet rules
export const TIMESHEET_RULES = {
  maxDailyHours: 24,
  warnDailyHours: 10,
  defaultDailyHours: 8,
  maxWeeklyHours: 52,
} as const;

// Roles
export const ROLES = {
  SA: 'SA',
  PM: 'PM',
  PCM: 'PCM',
  PTK: 'PTK',
  DL: 'DL',
  USER: 'USER',
} as const;

// Timesheet status
export const TIMESHEET_STATUS: Record<string, { label: string; severity: string }> = {
  DRAFT: { label: '작성중', severity: 'secondary' },
  SUBMITTED: { label: '제출됨', severity: 'info' },
  DL_APPROVED: { label: 'DL승인', severity: 'warn' },
  APPROVED: { label: '승인', severity: 'success' },
  REJECTED: { label: '반려', severity: 'danger' },
};

// Project status
export const PROJECT_STATUS: Record<string, { label: string; severity: string }> = {
  ACTIVE: { label: '진행중', severity: 'success' },
  CLOSED: { label: '종료', severity: 'secondary' },
  HOLD: { label: '보류', severity: 'warn' },
};

// Entry types
export const ENTRY_TYPES: Record<string, { label: string; icon: string }> = {
  NON_PROJECT: { label: 'Non-Project', icon: 'pi pi-calendar' },
  OTHER_PROJECT: { label: 'Other Project', icon: 'pi pi-briefcase' },
  EPC: { label: 'EPC Project', icon: 'pi pi-building' },
};

// Non-Project categories
export const NP_CATEGORIES = [
  { value: 'ANNUAL_LEAVE', label: '연차' },
  { value: 'SICK_LEAVE', label: '병가' },
  { value: 'TRAINING', label: '교육' },
  { value: 'ADMIN', label: '행정' },
  { value: 'PUBLIC_HOLIDAY', label: '공휴일' },
  { value: 'OTHER', label: '기타' },
] as const;

// Sidebar menu
export const MENU_ITEMS = [
  {
    label: '대시보드',
    icon: 'pi pi-home',
    to: '/dashboard',
    roles: ['SA', 'PM', 'PCM', 'PTK', 'DL', 'USER'],
  },
  {
    label: '시수 관리',
    icon: 'pi pi-clock',
    roles: ['SA', 'PM', 'DL', 'USER'],
    items: [
      { label: '시수 입력', to: '/timesheets', roles: ['USER', 'DL', 'PM', 'SA'] },
      { label: '시수 이력', to: '/timesheets/history', roles: ['USER', 'DL', 'PM', 'SA'] },
      { label: 'Excel 업로드', to: '/timesheets/upload', roles: ['USER'] },
    ],
  },
  {
    label: '결재',
    icon: 'pi pi-check-square',
    roles: ['DL', 'PM', 'SA'],
    items: [
      { label: '결재 대기', to: '/approvals', roles: ['DL', 'PM', 'SA'] },
      { label: '결재 이력', to: '/approvals/history', roles: ['DL', 'PM', 'SA'] },
    ],
  },
  {
    label: '프로젝트',
    icon: 'pi pi-briefcase',
    roles: ['SA', 'PM', 'PCM'],
    items: [
      { label: '프로젝트 목록', to: '/projects', roles: ['SA', 'PM', 'PCM'] },
      { label: 'WBS 관리', to: '/wbs', roles: ['SA', 'PM', 'PCM'] },
      { label: 'TEAL 관리', to: '/teal', roles: ['SA', 'PM', 'PCM'] },
    ],
  },
  {
    label: '리포트',
    icon: 'pi pi-chart-bar',
    to: '/reports',
    roles: ['SA', 'PM', 'PCM', 'DL'],
  },
  {
    label: '사용자 관리',
    icon: 'pi pi-users',
    to: '/users',
    roles: ['SA', 'PTK'],
  },
  {
    label: '시스템 설정',
    icon: 'pi pi-cog',
    to: '/settings',
    roles: ['SA'],
  },
];
