/**
 * 採購單狀態標籤組件
 */

import { StatusBadge } from "@/Components/shared/StatusBadge";
import { PurchaseOrderStatus } from "@/types/purchase-order";
import { STATUS_CONFIG } from "@/constants/purchase-order";

interface PurchaseOrderStatusBadgeProps {
    status: PurchaseOrderStatus;
    className?: string;
}

export default function PurchaseOrderStatusBadge({
    status,
    className,
}: PurchaseOrderStatusBadgeProps) {
    const config = STATUS_CONFIG[status] || { label: "未知", variant: "neutral" };

    return (
        <StatusBadge variant={config.variant} className={className}>
            {config.label}
        </StatusBadge>
    );
}
