// Icon library — 1.8px stroke, currentColor
const Icon = ({ name, size = 20, ...rest }) => {
  const s = size;
  const stroke = 1.8;
  const common = {
    width: s, height: s, viewBox: "0 0 24 24",
    fill: "none", stroke: "currentColor",
    strokeWidth: stroke, strokeLinecap: "round", strokeLinejoin: "round",
    ...rest,
  };
  switch (name) {
    case "check":
      return <svg {...common}><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>;
    case "check-circle":
      return <svg {...common}><circle cx="12" cy="12" r="9"/><path d="M8 12l3 3 5-6"/></svg>;
    case "doc":
      return <svg {...common}><path d="M7 3h7l4 4v14H7z"/><path d="M14 3v4h4"/><path d="M10 13h6M10 17h4"/></svg>;
    case "money":
      return <svg {...common}><rect x="3" y="7" width="18" height="12" rx="2"/><circle cx="12" cy="13" r="2.5"/><path d="M6 10h.5M17.5 10h.5"/></svg>;
    case "car":
      return <svg {...common}><path d="M5 17V12l2-5h10l2 5v5"/><path d="M3 17h18v2a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1H6v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"/><circle cx="8" cy="17" r="1.3"/><circle cx="16" cy="17" r="1.3"/></svg>;
    case "taxi":
      return <svg {...common}><path d="M5 17V12l2-5h10l2 5v5"/><path d="M3 17h18v2a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1H6v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"/><circle cx="8" cy="17" r="1.3"/><circle cx="16" cy="17" r="1.3"/><path d="M9 7V5h6v2"/></svg>;
    case "shield":
      return <svg {...common}><path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z"/><path d="M9 12l2 2 4-4"/></svg>;
    case "clock":
      return <svg {...common}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>;
    case "users":
      return <svg {...common}><circle cx="9" cy="9" r="3.5"/><path d="M3 19c0-3 3-5 6-5s6 2 6 5"/><circle cx="17" cy="8" r="2.5"/><path d="M15.5 14c2.5 0 5.5 1.6 5.5 4.5"/></svg>;
    case "plus":
      return <svg {...common}><path d="M12 5v14M5 12h14"/></svg>;
    case "settings":
      return <svg {...common}><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5v.2a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H2a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H8a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H22a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></svg>;
    case "whatsapp":
      return <svg width={s} height={s} viewBox="0 0 24 24" fill="currentColor"><path d="M17.5 14.4c-.3-.1-1.6-.8-1.9-.9-.2-.1-.4-.1-.6.1s-.7.9-.9 1.1c-.2.2-.3.2-.6.1-1.5-.8-2.5-1.4-3.5-3.2-.3-.5.3-.5.8-1.5.1-.2 0-.3 0-.5s-.6-1.5-.9-2c-.2-.5-.5-.4-.7-.4h-.5c-.2 0-.5.1-.7.3-.2.2-1 1-1 2.4s1 2.8 1.1 3c.1.2 2 3 4.8 4.2 1.8.8 2.5.8 3.4.7.5-.1 1.6-.7 1.9-1.3s.2-1.2.2-1.3c-.1-.1-.3-.2-.6-.3zM12 2a10 10 0 0 0-8.5 15.3L2 22l4.8-1.4A10 10 0 1 0 12 2zm0 18c-1.6 0-3.2-.5-4.6-1.4l-.3-.2-3.1.9.9-3-.2-.3A8.2 8.2 0 1 1 12 20z"/></svg>;
    case "arrow-right":
      return <svg {...common}><path d="M5 12h14M13 6l6 6-6 6"/></svg>;
    case "arrow-down":
      return <svg {...common}><path d="M12 5v14M6 13l6 6 6-6"/></svg>;
    case "heart":
      return <svg {...common}><path d="M12 20s-7-4.5-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.5-7 10-7 10z"/></svg>;
    case "accessibility":
      return <svg {...common}><circle cx="12" cy="4.5" r="1.8"/><path d="M6 8l4.5 1.5v4M17.5 8L13.5 9.5"/><path d="M10.5 13.5l-2 7M13.5 13.5l.5 2.5 3.5 1.5"/><circle cx="12" cy="16" r="5" strokeDasharray="2 2.5"/></svg>;
    case "menu":
      return <svg {...common}><path d="M4 7h16M4 12h16M4 17h16"/></svg>;
    case "instagram":
      return <svg {...common}><rect x="3" y="3" width="18" height="18" rx="5"/><circle cx="12" cy="12" r="4"/><circle cx="17.3" cy="6.7" r="0.8" fill="currentColor"/></svg>;
    case "map-pin":
      return <svg {...common}><path d="M12 22s-7-8-7-13a7 7 0 1 1 14 0c0 5-7 13-7 13z"/><circle cx="12" cy="9" r="2.5"/></svg>;
    case "file-search":
      return <svg {...common}><path d="M7 3h7l4 4v6"/><path d="M14 3v4h4"/><circle cx="15" cy="17" r="3"/><path d="M17.2 19.2L20 22"/></svg>;
    case "building":
      return <svg {...common}><rect x="4" y="3" width="16" height="18" rx="1"/><path d="M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2"/><path d="M10 21v-3h4v3"/></svg>;
    case "stamp":
      return <svg {...common}><path d="M6 10a4 4 0 0 1 4-4V4a2 2 0 1 1 4 0v2a4 4 0 0 1 4 4v2H6z"/><rect x="4" y="15" width="16" height="3" rx="1"/><path d="M5 21h14"/></svg>;
    case "clipboard":
      return <svg {...common}><rect x="6" y="5" width="12" height="16" rx="1"/><path d="M9 3h6v4H9z"/><path d="M9 11h6M9 15h4"/></svg>;
    case "key":
      return <svg {...common}><circle cx="8" cy="14" r="4"/><path d="M11 11l9-9M17 5l3 3M15 7l3 3"/></svg>;
    default:
      return null;
  }
};

window.Icon = Icon;
