// ===== 문서 작성 타입 정의 =====

// 문서 유형
export type DocumentType = 'proposal' | 'expenseReport' | 'expenseEstimate';

export const DOCUMENT_TYPE_OPTIONS: { value: DocumentType; label: string }[] = [
  { value: 'proposal', label: '품의서' },
  { value: 'expenseReport', label: '지출결의서' },
  { value: 'expenseEstimate', label: '지출 예상 내역서' },
];

// 결재자/참조자 정보
export interface ApprovalPerson {
  id: string;
  department: string;
  position: string;
  name: string;
}

// 기본 정보
export interface BasicInfo {
  drafter: string;
  draftDate: string;
  documentNo: string;
  documentType: DocumentType;
}

// 품의서 데이터
export interface ProposalData {
  vendor: string;
  vendorPaymentDate: string;
  title: string;
  description: string;
  reason: string;
  estimatedCost: number;
  attachments: File[];
}

// 지출결의서 항목
export interface ExpenseReportItem {
  id: string;
  description: string;
  amount: number;
  note: string;
}

// 지출결의서 데이터
export interface ExpenseReportData {
  requestDate: string;
  paymentDate: string;
  items: ExpenseReportItem[];
  cardId: string;
  totalAmount: number;
  attachments: File[];
}

// 지출 예상 내역서 항목
export interface ExpenseEstimateItem {
  id: string;
  checked: boolean;
  expectedPaymentDate: string;
  category: string;
  amount: number;
  vendor: string;
  memo: string;
}

// 지출 예상 내역서 데이터
export interface ExpenseEstimateData {
  items: ExpenseEstimateItem[];
  totalExpense: number;
  accountBalance: number;
  finalDifference: number;
}

// 전체 문서 데이터
export interface DocumentFormData {
  basicInfo: BasicInfo;
  approvalLine: ApprovalPerson[];
  references: ApprovalPerson[];
  proposalData?: ProposalData;
  expenseReportData?: ExpenseReportData;
  expenseEstimateData?: ExpenseEstimateData;
}

// 카드 옵션
export const CARD_OPTIONS = [
  { value: 'ibk-1234', label: 'IBK기업카드_1234 (카드명)' },
  { value: 'shinhan-5678', label: '신한카드_5678 (카드명)' },
  { value: 'kb-9012', label: 'KB국민카드_9012 (카드명)' },
];

// Mock 사원 데이터
export const MOCK_EMPLOYEES: ApprovalPerson[] = [
  { id: '1', department: '개발팀', position: '팀장', name: '김철수' },
  { id: '2', department: '개발팀', position: '부장', name: '이영희' },
  { id: '3', department: '인사팀', position: '팀장', name: '박민수' },
  { id: '4', department: '경영지원팀', position: '이사', name: '정수진' },
  { id: '5', department: '영업팀', position: '대표', name: '최동현' },
];