import type { DashboardReportCardWidgetProps } from '../widgets/dashboard-report-card/DashboardReportCardWidget';

export const wmsInboundOutboundCardPreset: DashboardReportCardWidgetProps = {
  id: 'wms-inbound-outbound-report',
  title: '입/출고 진행 현황',
  moduleLabel: 'WMS 대시보드',
  sectionLayout: 'vertical',
  sections: [
    {
      kind: 'grouped-progress-list',
      legend: '입고 / 출고',
      title: '입고/출고 진행 상태',
      groups: [
        {
          legend: '입고',
          items: [
            { label: '미입고', percent: 24, color: '#ff9f43' },
            { label: '검수', percent: 18, color: '#7367f0' },
            { label: '적치', percent: 32, color: '#00cfe8' },
            { label: '확정', percent: 26, color: '#28c76f' },
          ],
        },
        {
          legend: '출고',
          items: [
            { label: '미출고', percent: 21, color: '#ff9f43' },
            { label: '할당', percent: 17, color: '#7367f0' },
            { label: '피킹', percent: 34, color: '#00cfe8' },
            { label: '확정', percent: 28, color: '#28c76f' },
          ],
        },
      ],
    },
    {
      kind: 'line-chart',
      legend: '재고 추이',
      title: '현재일 -6일까지 재고 수량',
      points: [
        { label: 'D-6', value: 720 },
        { label: 'D-5', value: 680 },
        { label: 'D-4', value: 740 },
        { label: 'D-3', value: 760 },
        { label: 'D-2', value: 790 },
        { label: 'D-1', value: 810 },
        { label: 'Today', value: 845 },
      ],
    },
  ],
};

export const wmsInventoryTrendCardPreset: DashboardReportCardWidgetProps = {
  id: 'wms-inventory-trend-report',
  title: '재고 상태 분석',
  moduleLabel: 'WMS 대시보드',
  sectionLayout: 'vertical',
  sections: [
    {
      kind: 'segmented-progress',
      legend: '재고 상태',
      title: '재고 상태 비중',
      segments: [
        { label: '정상 재고', percent: 58, color: '#28c76f' },
        { label: '보류 재고', percent: 24, color: '#ff9f43' },
        { label: '점검 재고', percent: 18, color: '#7367f0' },
      ],
    },
    {
      kind: 'pie-chart',
      legend: '보관 기간',
      title: '보관기간별 재고',
      totalLabel: '총재고',
      segments: [
        { label: '1주 이내', percent: 18, color: '#165dff' },
        { label: '2주 이내', percent: 22, color: '#00cfe8' },
        { label: '1개월 이내', percent: 27, color: '#28c76f' },
        { label: '3개월 초과', percent: 33, color: '#ff9f43' },
      ],
    },
  ],
};

export const tmsDeliveryFlowCardPreset: DashboardReportCardWidgetProps = {
  id: 'tms-delivery-flow-report',
  title: '배송 진행 현황',
  moduleLabel: 'TMS 대시보드',
  sectionLayout: 'vertical',
  sections: [
    {
      kind: 'progress-list',
      legend: '배송 상태',
      title: '배송 진행 상태',
      items: [
        { label: '배차대기', percent: 12, color: '#ff9f43' },
        { label: '배차완료', percent: 18, color: '#7367f0' },
        { label: '배송중', percent: 34, color: '#00cfe8' },
        { label: '배송완료', percent: 28, color: '#28c76f' },
        { label: '지연', percent: 8, color: '#ea5455' },
      ],
    },
    {
      kind: 'line-chart',
      legend: '배송 건수',
      title: '일별 배송 건수',
      points: [
        { label: 'D-6', value: 120 },
        { label: 'D-5', value: 138 },
        { label: 'D-4', value: 145 },
        { label: 'D-3', value: 152 },
        { label: 'D-2', value: 160 },
        { label: 'D-1', value: 149 },
        { label: 'Today', value: 168 },
      ],
    },
  ],
};

export const tmsDeliveryMetricsCardPreset: DashboardReportCardWidgetProps = {
  id: 'tms-delivery-metrics-report',
  title: '배송 실적 지표',
  moduleLabel: 'TMS 대시보드',
  sectionLayout: 'vertical',
  sections: [
    {
      kind: 'metrics',
      legend: '배송 지표',
      title: '평균/최대/SLA',
      metrics: [
        { label: '평균 배송 시간', value: '2시간 14분' },
        { label: '최대 배송 시간', value: '5시간 48분' },
        { label: 'SLA 준수율', value: '96.4%' },
      ],
    },
    {
      kind: 'pie-chart',
      legend: '정시 비율',
      title: '정시 배송 / 지연 배송',
      totalLabel: '총배송',
      segments: [
        { label: '정시 배송', percent: 91, color: '#28c76f' },
        { label: '지연 배송', percent: 9, color: '#ea5455' },
      ],
    },
  ],
};
