import React from 'react';
import type { CoopStatus } from '../types';

const STATUS_CLASS: Record<CoopStatus, string> = {
  已合作: 'sm-status-cooperated',
  洽谈中: 'sm-status-negotiating',
  终止合作: 'sm-status-terminated',
  合约过期: 'sm-status-expired',
};

interface CoopStatusBadgeProps {
  status: CoopStatus;
}

export function CoopStatusBadge({ status }: CoopStatusBadgeProps) {
  return (
    <span className={`sm-status-badge ${STATUS_CLASS[status]}`}>
      <span className="sm-status-dot" aria-hidden />
      {status}
    </span>
  );
}
