/**
 * 生產工單狀態相關常數
 */

export const PRODUCTION_ORDER_STATUS = {
    DRAFT: 'draft',
    PENDING: 'pending',
    APPROVED: 'approved',
    IN_PROGRESS: 'in_progress',
    COMPLETED: 'completed',
    CANCELLED: 'cancelled',
} as const;

export type ProductionOrderStatus = typeof PRODUCTION_ORDER_STATUS[keyof typeof PRODUCTION_ORDER_STATUS];

export const STATUS_CONFIG: Record<ProductionOrderStatus, { label: string; variant: "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "info" }> = {
    [PRODUCTION_ORDER_STATUS.DRAFT]: {
        label: "草稿",
        variant: "outline",
    },
    [PRODUCTION_ORDER_STATUS.PENDING]: {
        label: "審核中",
        variant: "info",
    },
    [PRODUCTION_ORDER_STATUS.APPROVED]: {
        label: "已核准",
        variant: "success",
    },
    [PRODUCTION_ORDER_STATUS.IN_PROGRESS]: {
        label: "製作中",
        variant: "warning",
    },
    [PRODUCTION_ORDER_STATUS.COMPLETED]: {
        label: "製作完成",
        variant: "default",
    },
    [PRODUCTION_ORDER_STATUS.CANCELLED]: {
        label: "已作廢",
        variant: "destructive",
    },
};
