// Inline SVG icons — single stroke, 1.5px, 16x16 viewBox.
// All take {size, color} and inherit currentColor.

const Ico = ({ d, size = 14, stroke = 1.5, fill, children, ...rest }) => (
  <svg width={size} height={size} viewBox="0 0 16 16" fill="none"
       stroke="currentColor" strokeWidth={stroke} strokeLinecap="round"
       strokeLinejoin="round" {...rest}>
    {d ? <path d={d} /> : children}
  </svg>
);

const Icon = {
  Search:  (p) => <Ico {...p}><circle cx="7" cy="7" r="4.5" /><path d="M10.5 10.5 14 14" /></Ico>,
  Bell:    (p) => <Ico {...p}><path d="M4 11h8l-1-1.5V7a3 3 0 0 0-6 0v2.5L4 11Z" /><path d="M6.5 13a1.5 1.5 0 0 0 3 0" /></Ico>,
  Inbox:   (p) => <Ico {...p}><path d="M2.5 8.5 4 3h8l1.5 5.5" /><path d="M2.5 8.5h3l1 1.5h3l1-1.5h3v4.5h-11z" /></Ico>,
  Folder:  (p) => <Ico {...p}><path d="M2 4.5A1.5 1.5 0 0 1 3.5 3h2.4l1.2 1.5h5.4A1.5 1.5 0 0 1 14 6v6.5A1.5 1.5 0 0 1 12.5 14h-9A1.5 1.5 0 0 1 2 12.5z" /></Ico>,
  Flow:    (p) => <Ico {...p}><circle cx="3.5" cy="3.5" r="1.5" /><circle cx="12.5" cy="3.5" r="1.5" /><circle cx="3.5" cy="12.5" r="1.5" /><circle cx="12.5" cy="12.5" r="1.5" /><path d="M3.5 5v6M12.5 5v6M5 3.5h6M5 12.5h6" /></Ico>,
  Users:   (p) => <Ico {...p}><circle cx="6" cy="6" r="2.5" /><path d="M2 13c0-2 1.8-3.5 4-3.5s4 1.5 4 3.5" /><circle cx="11" cy="6.5" r="1.8" /><path d="M10 9.5c2 0 4 1.2 4 3" /></Ico>,
  Chart:   (p) => <Ico {...p}><path d="M2.5 13.5v-9M6.5 13.5V8M10.5 13.5V5M14 13.5h-12" /></Ico>,
  Settings:(p) => <Ico {...p}><circle cx="8" cy="8" r="2" /><path d="M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4" /></Ico>,
  Shield:  (p) => <Ico {...p}><path d="M8 1.5 3 3v5c0 3 2.2 5.5 5 6.5 2.8-1 5-3.5 5-6.5V3l-5-1.5Z" /></Ico>,
  Chevron: (p) => <Ico {...p}><path d="m6 4 4 4-4 4" /></Ico>,
  ChevronD:(p) => <Ico {...p}><path d="m4 6 4 4 4-4" /></Ico>,
  ChevronU:(p) => <Ico {...p}><path d="m4 10 4-4 4 4" /></Ico>,
  Plus:    (p) => <Ico {...p}><path d="M8 3.5v9M3.5 8h9" /></Ico>,
  Filter:  (p) => <Ico {...p}><path d="M2.5 3.5h11l-4 5v4l-3 1V8.5l-4-5Z" /></Ico>,
  Download:(p) => <Ico {...p}><path d="M8 2.5v8M5 7.5l3 3 3-3M3 13.5h10" /></Ico>,
  More:    (p) => <Ico {...p}><circle cx="3.5" cy="8" r=".8" fill="currentColor" stroke="none" /><circle cx="8" cy="8" r=".8" fill="currentColor" stroke="none" /><circle cx="12.5" cy="8" r=".8" fill="currentColor" stroke="none" /></Ico>,
  Check:   (p) => <Ico {...p}><path d="m3.5 8.5 3 3 6-6" /></Ico>,
  X:       (p) => <Ico {...p}><path d="m4 4 8 8M12 4l-8 8" /></Ico>,
  ArrowUp: (p) => <Ico {...p}><path d="M8 3v10M4 7l4-4 4 4" /></Ico>,
  ArrowDn: (p) => <Ico {...p}><path d="M8 13V3M4 9l4 4 4-4" /></Ico>,
  ArrowR:  (p) => <Ico {...p}><path d="M3 8h10M9 4l4 4-4 4" /></Ico>,
  Clock:   (p) => <Ico {...p}><circle cx="8" cy="8" r="5.5" /><path d="M8 5v3l2 1.5" /></Ico>,
  Globe:   (p) => <Ico {...p}><circle cx="8" cy="8" r="5.5" /><path d="M2.5 8h11M8 2.5c2 2 2 9 0 11M8 2.5c-2 2-2 9 0 11" /></Ico>,
  Flag:    (p) => <Ico {...p}><path d="M3.5 14V2.5M3.5 2.5h8l-1.5 2.5L11.5 8h-8" /></Ico>,
  Eye:     (p) => <Ico {...p}><path d="M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8Z" /><circle cx="8" cy="8" r="2" /></Ico>,
  Star:    (p) => <Ico {...p}><path d="m8 2 1.8 3.7 4 .6-2.9 2.8.7 4-3.6-1.9-3.6 1.9.7-4L2.2 6.3l4-.6L8 2Z" /></Ico>,
  Link:    (p) => <Ico {...p}><path d="M7 9.5c-1-1-1-2.5 0-3.5l2-2c1-1 2.5-1 3.5 0s1 2.5 0 3.5l-1 1M9 6.5c1 1 1 2.5 0 3.5l-2 2c-1 1-2.5 1-3.5 0s-1-2.5 0-3.5l1-1" /></Ico>,
  Building:(p) => <Ico {...p}><path d="M3 14V3.5h6V14M9 14V7h4v7M5 5.5h2M5 7.5h2M5 9.5h2M5 11.5h2M11 9h.5M11 11h.5" /></Ico>,
  Person:  (p) => <Ico {...p}><circle cx="8" cy="5.5" r="2.5" /><path d="M3 14c0-2.5 2-4.5 5-4.5s5 2 5 4.5" /></Ico>,
  Note:    (p) => <Ico {...p}><path d="M3 3h7l3 3v7H3z" /><path d="M10 3v3h3M5.5 8h5M5.5 10.5h3" /></Ico>,
  Calendar:(p) => <Ico {...p}><rect x="2.5" y="3.5" width="11" height="10" rx="1" /><path d="M2.5 6.5h11M5.5 2v3M10.5 2v3" /></Ico>,
  Refresh: (p) => <Ico {...p}><path d="M13 4.5v3h-3M3 11.5v-3h3" /><path d="M12.5 7.5A4.5 4.5 0 0 0 4 6M3.5 8.5A4.5 4.5 0 0 0 12 10" /></Ico>,
  Sliders: (p) => <Ico {...p}><path d="M2.5 4.5h11M2.5 8h11M2.5 11.5h11" /><circle cx="6" cy="4.5" r="1.4" fill="var(--bg)" /><circle cx="10" cy="8" r="1.4" fill="var(--bg)" /><circle cx="5" cy="11.5" r="1.4" fill="var(--bg)" /></Ico>,
  Bolt:    (p) => <Ico {...p}><path d="M8.5 1.5 4 9h3l-.5 5.5L11 7H8l.5-5.5Z" /></Ico>,
  Bank:    (p) => <Ico {...p}><path d="M2 6 8 2.5 14 6M3 6v6M13 6v6M5.5 6.5v5M8 6.5v5M10.5 6.5v5M2 13.5h12" /></Ico>,
  Card:    (p) => <Ico {...p}><rect x="1.5" y="3.5" width="13" height="9" rx="1.5" /><path d="M1.5 6.5h13M3.5 10h2" /></Ico>,
  Dollar:  (p) => <Ico {...p}><path d="M8 2v12M11 5H6.5a2 2 0 0 0 0 4h3a2 2 0 0 1 0 4H5" /></Ico>,
  Sun:     (p) => <Ico {...p}><circle cx="8" cy="8" r="2.8" /><path d="M8 1.5v1.8M8 12.7v1.8M1.5 8h1.8M12.7 8h1.8M3.4 3.4l1.3 1.3M11.3 11.3l1.3 1.3M3.4 12.6l1.3-1.3M11.3 4.7l1.3-1.3" /></Ico>,
  Moon:    (p) => <Ico {...p}><path d="M13 9.5A5.5 5.5 0 0 1 6.5 3a5.5 5.5 0 1 0 6.5 6.5Z" /></Ico>,
  Gauge:   (p) => <Ico {...p}><path d="M2.5 11.5a5.5 5.5 0 1 1 11 0" /><path d="M8 11.5 11 6.5" /><circle cx="8" cy="11.5" r="0.8" fill="currentColor" stroke="none" /></Ico>,
  Cycle:   (p) => <Ico {...p}><path d="M3 3.5h10v3M13 12.5H3v-3" /><path d="m11 1.5 2 2-2 2M5 14.5l-2-2 2-2" /></Ico>,
  Logout:  (p) => <Ico {...p}><path d="M6 3H3v10h3M7 8h6M11 5l3 3-3 3" /></Ico>,
  Bot:     (p) => <Ico {...p}><path d="M8 2v2" /><rect x="3" y="4.5" width="10" height="8.5" rx="2.5" /><circle cx="6" cy="8.5" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8.5" r="1" fill="currentColor" stroke="none" /><path d="M6 11h4" /><path d="M1.5 7.5v3M14.5 7.5v3" /></Ico>,
};

Object.assign(window, { Icon });
