/**
 * 팝업관리 타입 정의
 */

// 팝업 대상
export type PopupTarget = 'all' | 'department';

// 팝업 상태
export type PopupStatus = 'active' | 'inactive';

// 팝업 데이터 인터페이스
export interface Popup {
  id: string;
  target: PopupTarget;
  targetId?: number | null; // 부서 ID (대상이 department인 경우)
  targetName?: string; // 부서명 (대상이 department인 경우)
  title: string;
  content: string;
  status: PopupStatus;
  author: string;
  authorId: string;
  createdAt: string;
  startDate: string;
  endDate: string;
}

// 팝업 폼 데이터
export interface PopupFormData {
  target: PopupTarget;
  targetDepartmentId?: string;
  title: string;
  content: string;
  status: PopupStatus;
  startDate: string;
  endDate: string;
}

// 대상 옵션
export const TARGET_OPTIONS = [
  { value: 'all', label: '전사' },
  { value: 'department', label: '부서별' },
] as const;

// 상태 옵션
export const STATUS_OPTIONS = [
  { value: 'inactive', label: '사용안함' },
  { value: 'active', label: '사용함' },
] as const;

// Mock 데이터
export const MOCK_POPUPS: Popup[] = [
  {
    id: '1',
    target: 'all',
    title: '휴가',
    content: '<p>전사 휴가 안내입니다.</p>',
    status: 'active',
    author: '홍길동',
    authorId: 'user1',
    createdAt: '2025-09-03',
    startDate: '2025-09-30',
    endDate: '2025-12-10',
  },
  {
    id: '2',
    target: 'all',
    title: '휴직',
    content: '<p>휴직 관련 안내입니다.</p>',
    status: 'active',
    author: '홍길동',
    authorId: 'user1',
    createdAt: '2025-09-03',
    startDate: '2025-09-30',
    endDate: '2025-12-10',
  },
  {
    id: '3',
    target: 'department',
    targetName: '부서별',
    title: '휴가',
    content: '<p>부서별 휴가 안내입니다.</p>',
    status: 'inactive',
    author: '홍길동',
    authorId: 'user1',
    createdAt: '2025-09-03',
    startDate: '2025-09-30',
    endDate: '2025-12-10',
  },
  {
    id: '4',
    target: 'all',
    title: '휴직',
    content: '<p>휴직 안내입니다.</p>',
    status: 'inactive',
    author: '홍길동',
    authorId: 'user1',
    createdAt: '2025-09-03',
    startDate: '2025-09-30',
    endDate: '2025-12-10',
  },
  {
    id: '5',
    target: 'all',
    title: '휴직',
    content: '<p>전사 휴직 공지입니다.</p>',
    status: 'active',
    author: '홍길동',
    authorId: 'user1',
    createdAt: '2025-09-03',
    startDate: '2025-09-30',
    endDate: '2025-12-10',
  },
  {
    id: '6',
    target: 'all',
    title: '일정',
    content: '<p>전사 일정 안내입니다.</p>',
    status: 'active',
    author: '홍길동',
    authorId: 'user1',
    createdAt: '2025-09-03',
    startDate: '2025-09-30',
    endDate: '2025-12-10',
  },
  {
    id: '7',
    target: 'all',
    title: '휴가',
    content: '<p>휴가 일정 안내입니다.</p>',
    status: 'active',
    author: '홍길동',
    authorId: 'user1',
    createdAt: '2025-09-03',
    startDate: '2025-09-30',
    endDate: '2025-12-10',
  },
];