import type { AddressLabel } from '../core/types';

interface AddressLabelIconProps {
  label: AddressLabel;
  className?: string;
  /** Native only — web uses `currentColor` via CSS */
  color?: string;
}

/** Subtle stroke icons for Home / Work / Other address labels (web). */
export function AddressLabelIcon({ label, className }: AddressLabelIconProps) {
  const shared = {
    className,
    'aria-hidden': true as const,
    viewBox: '0 0 24 24',
    fill: 'none',
    stroke: 'currentColor',
    strokeWidth: 2,
    strokeLinecap: 'round' as const,
    strokeLinejoin: 'round' as const,
  };

  switch (label) {
    case 'home':
      return (
        <svg {...shared}>
          <path d="M3 9.5L12 3l9 6.5V20a1 1 0 01-1 1H5a1 1 0 01-1-1V9.5z" />
          <path d="M9 21V12h6v9" />
        </svg>
      );
    case 'work':
      return (
        <svg {...shared}>
          <rect x="2" y="7" width="20" height="14" rx="2" />
          <path d="M16 7V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v2" />
        </svg>
      );
    case 'other':
      return (
        <svg {...shared}>
          <path d="M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0118 0z" />
          <circle cx="12" cy="10" r="3" />
        </svg>
      );
  }
}
