import React from 'react';
import { Tag } from 'antd';
import type { SettlementStatus } from '@rent/shared-types';
import { SETTLEMENT_STATUS_MAP } from '@rent/shared-types';

interface SettlementStatusTagProps {
  status: SettlementStatus;
}

/**
 * 结算单状态标签组件
 */
export const SettlementStatusTag: React.FC<SettlementStatusTagProps> = ({ status }) => {
  const config = SETTLEMENT_STATUS_MAP[status];

  if (!config) {
    return <Tag>{status}</Tag>;
  }

  return <Tag color={config.color}>{config.label}</Tag>;
};
