// Crisp 20px line icons — stroke 1.7, currentColor
const I = ({ d, size = 20, fill = false, w = 1.7, children, vb = 24 }) => (
  <svg width={size} height={size} viewBox={`0 0 ${vb} ${vb}`} fill={fill ? 'currentColor' : 'none'} stroke="currentColor" strokeWidth={w} strokeLinecap="round" strokeLinejoin="round">
    {children ?? <path d={d} />}
  </svg>
);

const Icon = {
  Dashboard: (p) => <I {...p}><rect x="3" y="3" width="8" height="10" rx="2"/><rect x="13" y="3" width="8" height="6" rx="2"/><rect x="13" y="11" width="8" height="10" rx="2"/><rect x="3" y="15" width="8" height="6" rx="2"/></I>,
  Quote:     (p) => <I {...p}><path d="M5 4h10l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z"/><path d="M14 4v5h5"/><path d="M8 13h7M8 17h5"/></I>,
  Supplier:  (p) => <I {...p}><path d="M2 7h13v8H2zM15 10h4l3 3v2h-7"/><circle cx="6" cy="17" r="2"/><circle cx="18" cy="17" r="2"/></I>,
  Product:   (p) => <I {...p}><path d="M3.5 7 12 3l8.5 4-8.5 4Z"/><path d="M3.5 7v10L12 21V11"/><path d="M20.5 7v10L12 21"/></I>,
  Order:     (p) => <I {...p}><rect x="4" y="3" width="16" height="18" rx="2"/><path d="M8 8h8M8 12h8M8 16h5"/></I>,
  Stock:     (p) => <I {...p}><path d="M3 7l9-4 9 4-9 4-9-4Z"/><path d="M3 12l9 4 9-4M3 17l9 4 9-4"/></I>,
  Report:    (p) => <I {...p}><path d="M4 19V5"/><path d="M4 19h16"/><rect x="7" y="12" width="3" height="6"/><rect x="12" y="8" width="3" height="10"/><rect x="17" y="14" width="3" height="4"/></I>,
  Portal:    (p) => <I {...p}><path d="M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1"/><path d="M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1"/></I>,
  Settings:  (p) => <I {...p}><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.5V21a2 2 0 1 1-4 0v-.1A1.7 1.7 0 0 0 9 19.4a1.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-1H3a2 2 0 1 1 0-4h.1A1.7 1.7 0 0 0 4.6 9a1.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.3H9a1.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 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z"/></I>,
  Bell:      (p) => <I {...p}><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9Z"/><path d="M10 21a2 2 0 0 0 4 0"/></I>,
  Search:    (p) => <I {...p}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></I>,
  Plus:      (p) => <I {...p}><path d="M12 5v14M5 12h14"/></I>,
  Arrow:     (p) => <I {...p}><path d="M5 12h14M13 6l6 6-6 6"/></I>,
  ArrowDown: (p) => <I {...p}><path d="M12 5v14M6 13l6 6 6-6"/></I>,
  ArrowUp:   (p) => <I {...p}><path d="M12 19V5M6 11l6-6 6 6"/></I>,
  Chevron:   (p) => <I {...p}><path d="m9 6 6 6-6 6"/></I>,
  Check:     (p) => <I {...p}><path d="m5 12 5 5L20 7"/></I>,
  X:         (p) => <I {...p}><path d="M6 6l12 12M18 6 6 18"/></I>,
  Menu:      (p) => <I {...p}><path d="M4 7h16M4 12h16M4 17h16"/></I>,
  Filter:    (p) => <I {...p}><path d="M3 5h18l-7 9v6l-4-2v-4Z"/></I>,
  Calendar:  (p) => <I {...p}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18M8 3v4M16 3v4"/></I>,
  Sparkle:   (p) => <I {...p}><path d="M12 3v6M12 15v6M3 12h6M15 12h6"/><path d="m5.6 5.6 4.2 4.2M14.2 14.2l4.2 4.2M18.4 5.6l-4.2 4.2M9.8 14.2l-4.2 4.2"/></I>,
  Truck:     (p) => <I {...p}><path d="M2 7h12v9H2zM14 11h5l3 3v2h-8"/><circle cx="6" cy="17" r="2"/><circle cx="18" cy="17" r="2"/></I>,
  Warning:   (p) => <I {...p}><path d="M10.3 3.5 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3l-8.5-14.5a2 2 0 0 0-3.4 0Z"/><path d="M12 9v5M12 18h.01"/></I>,
  Trend:     (p) => <I {...p}><path d="m3 17 6-6 4 4 8-8"/><path d="M14 7h7v7"/></I>,
  TrendDown: (p) => <I {...p}><path d="m3 7 6 6 4-4 8 8"/><path d="M14 17h7v-7"/></I>,
  Eye:       (p) => <I {...p}><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/></I>,
  Edit:      (p) => <I {...p}><path d="M4 20h4l11-11-4-4L4 16Z"/></I>,
  Trash:     (p) => <I {...p}><path d="M4 7h16M9 7V4h6v3M6 7l1 13a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-13"/></I>,
  Copy:      (p) => <I {...p}><rect x="8" y="8" width="13" height="13" rx="2"/><path d="M3 16V4a1 1 0 0 1 1-1h12"/></I>,
  Download:  (p) => <I {...p}><path d="M12 3v13M6 11l6 6 6-6"/><path d="M4 21h16"/></I>,
  Upload:    (p) => <I {...p}><path d="M12 21V8M6 13l6-6 6 6"/><path d="M4 3h16"/></I>,
  Send:      (p) => <I {...p}><path d="m4 12 16-7-4 16-4-7Z"/><path d="m4 12 12-5"/></I>,
  WhatsApp:  (p) => <I {...p}><path d="M20 12a8 8 0 1 1-3-6.2L20 4l-1.2 3A8 8 0 0 1 20 12Z"/><path d="M8 10c0 4 2 6 6 6"/></I>,
  Mail:      (p) => <I {...p}><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3 7 9 7 9-7"/></I>,
  Camera:    (p) => <I {...p}><path d="M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z"/><circle cx="12" cy="13" r="4"/></I>,
  Link:      (p) => <I {...p}><path d="M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1"/><path d="M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1"/></I>,
  Doc:       (p) => <I {...p}><path d="M5 4h10l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z"/><path d="M14 4v5h5"/></I>,
  Cart:      (p) => <I {...p}><path d="M3 4h2l2 13h12l2-9H7"/><circle cx="9" cy="20" r="1.5"/><circle cx="18" cy="20" r="1.5"/></I>,
  Box:       (p) => <I {...p}><path d="M3 7 12 3l9 4v10l-9 4-9-4Z"/><path d="m3 7 9 4 9-4M12 11v10"/></I>,
  Lightning: (p) => <I {...p}><path d="M13 2 4 14h7l-1 8 9-12h-7l1-8Z"/></I>,
  Wand:      (p) => <I {...p}><path d="M5 19 15 9M15 9l4-4 1 1-4 4M15 9l1 1M5 19l1 1"/></I>,
  Crown:     (p) => <I {...p}><path d="M3 7l4 4 5-7 5 7 4-4-2 13H5L3 7Z"/></I>,
  Reply:     (p) => <I {...p}><path d="M9 17 4 12l5-5"/><path d="M4 12h11a5 5 0 0 1 5 5v3"/></I>,
  Star:      (p) => <I {...p} fill={true}><path d="m12 3 2.6 6 6.4.6-4.9 4.3 1.5 6.3L12 17l-5.6 3.2 1.5-6.3L3 9.6l6.4-.6Z" stroke="none"/></I>,
  Logo:      ({ size = 28 }) => (
    <svg width={size} height={size} viewBox="0 0 32 32">
      <defs>
        <linearGradient id="lgmain" x1="0" y1="0" x2="1" y2="1">
          <stop offset="0%" stopColor="oklch(0.78 0.16 160)"/>
          <stop offset="100%" stopColor="oklch(0.62 0.14 240)"/>
        </linearGradient>
      </defs>
      <rect x="2" y="2" width="28" height="28" rx="8" fill="url(#lgmain)"/>
      <path d="M10 22V11l6-5 6 5v11" fill="none" stroke="white" strokeWidth="2.2" strokeLinejoin="round" strokeLinecap="round"/>
      <circle cx="16" cy="17" r="2.2" fill="white"/>
    </svg>
  ),
};

window.Icon = Icon;
