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

interface StatusBadgeProps {
  status: CustomerStatus;
}

export function StatusBadge({ status }: StatusBadgeProps) {
  const dotColor = status === '正常' ? '#00b42a' : status === '黑名单' ? '#f53f3f' : '#86909c';
  return (
    <span className="cm-status-badge">
      <span className="cm-status-dot" style={{ backgroundColor: dotColor }} aria-hidden />
      <span>{status}</span>
    </span>
  );
}
