import { DocumentConfig } from '../../types';
import {
  ProposalDocument,
  ExpenseReportDocument,
  ExpenseEstimateDocument,
} from '@/components/approval/DocumentDetail';

/**
 * 품의서
 */
export const proposalConfig: DocumentConfig = {
  type: 'proposal',
  title: '품의서',
  preset: 'approval',
  component: ProposalDocument,
};

/**
 * 지출결의서
 */
export const expenseReportConfig: DocumentConfig = {
  type: 'expense-report',
  title: '지출결의서',
  preset: 'approval',
  component: ExpenseReportDocument,
};

/**
 * 지출 예상 내역서
 */
export const expenseEstimateConfig: DocumentConfig = {
  type: 'expense-estimate',
  title: '지출 예상 내역서',
  preset: 'approval',
  component: ExpenseEstimateDocument,
};

/**
 * 결재 문서 Config 맵
 */
export const APPROVAL_DOCUMENT_CONFIGS = {
  'proposal': proposalConfig,
  'expense-report': expenseReportConfig,
  'expense-estimate': expenseEstimateConfig,
} as const;

export type ApprovalDocumentType = keyof typeof APPROVAL_DOCUMENT_CONFIGS;
