/* global React */
// Lucide-style icon set (MIT) — outline, stroke 1.5
// Only the icons we actually use, hand-curated.

const I = (paths, opts = {}) => ({ size = 18, ...rest } = {}) => (
  React.createElement('svg', {
    width: size, height: size, viewBox: '0 0 24 24',
    fill: 'none', stroke: 'currentColor', strokeWidth: opts.stroke || 1.5,
    strokeLinecap: 'round', strokeLinejoin: 'round',
    ...rest
  }, paths.map((p, i) =>
    typeof p === 'string'
      ? React.createElement('path', { d: p, key: i })
      : React.createElement(p.tag, { ...p.attrs, key: i })
  ))
);

window.Icons = {
  Home: I(['M3 12 12 4l9 8', 'M5 10v10h14V10']),
  LayoutDashboard: I([
    { tag: 'rect', attrs: { x: 3, y: 3, width: 7, height: 9, rx: 1 } },
    { tag: 'rect', attrs: { x: 14, y: 3, width: 7, height: 5, rx: 1 } },
    { tag: 'rect', attrs: { x: 14, y: 12, width: 7, height: 9, rx: 1 } },
    { tag: 'rect', attrs: { x: 3, y: 16, width: 7, height: 5, rx: 1 } },
  ]),
  ListChecks: I([
    'M3 17l2 2 4-4',
    'M3 7l2 2 4-4',
    'M13 6h8',
    'M13 12h8',
    'M13 18h8',
  ]),
  Upload: I([
    'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4',
    'M17 8l-5-5-5 5',
    'M12 3v12',
  ]),
  Plus: I(['M12 5v14', 'M5 12h14']),
  PlusCircle: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 9 } },
    'M12 8v8', 'M8 12h8',
  ]),
  MessageSquare: I([
    'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z',
  ]),
  Bell: I([
    'M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9',
    'M10.3 21a1.94 1.94 0 0 0 3.4 0',
  ]),
  FileBarChart: I([
    'M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z',
    'M14 3v6h6',
    'M8 17v-3', 'M12 17v-6', 'M16 17v-1',
  ]),
  Users: I([
    'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2',
    { tag: 'circle', attrs: { cx: 9, cy: 7, r: 4 } },
    'M23 21v-2a4 4 0 0 0-3-3.87',
    'M16 3.13a4 4 0 0 1 0 7.75',
  ]),
  Globe: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 9 } },
    'M3 12h18',
    'M12 3a14 14 0 0 1 0 18',
    'M12 3a14 14 0 0 0 0 18',
  ]),
  Search: I([
    { tag: 'circle', attrs: { cx: 11, cy: 11, r: 7 } },
    'M21 21l-4.3-4.3',
  ]),
  Settings: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 3 } },
    'M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9c0 .69.28 1.31.74 1.76l.04.04A1.65 1.65 0 0 0 21 12c0 .69-.42 1.32-1 1.65l-.04.02A1.65 1.65 0 0 0 19.4 15z',
  ], { stroke: 1.3 }),
  ChevronRight: I(['M9 6l6 6-6 6']),
  ChevronDown: I(['M6 9l6 6 6-6']),
  ArrowRight: I(['M5 12h14', 'M12 5l7 7-7 7']),
  ArrowUpRight: I(['M7 17 17 7', 'M8 7h9v9']),
  Clock: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 9 } },
    'M12 7v5l3 2',
  ]),
  AlertTriangle: I([
    'M10.3 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z',
    'M12 9v4', 'M12 17h0',
  ]),
  AlertCircle: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 9 } },
    'M12 8v4', 'M12 16h0',
  ]),
  CheckCircle2: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 9 } },
    'm8 12 3 3 5-6',
  ]),
  XCircle: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 9 } },
    'M15 9l-6 6', 'M9 9l6 6',
  ]),
  Building2: I([
    'M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18',
    'M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2',
    'M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2',
    'M10 6h4', 'M10 10h4', 'M10 14h4', 'M10 18h4',
  ]),
  FileText: I([
    'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z',
    'M14 2v6h6',
    'M8 13h8', 'M8 17h8', 'M8 9h2',
  ]),
  Inbox: I([
    'M22 12h-6l-2 3h-4l-2-3H2',
    'M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z',
  ]),
  Download: I([
    'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4',
    'M7 10l5 5 5-5',
    'M12 15V3',
  ]),
  Calendar: I([
    { tag: 'rect', attrs: { x: 3, y: 4, width: 18, height: 18, rx: 2 } },
    'M16 2v4', 'M8 2v4', 'M3 10h18',
  ]),
  Eye: I([
    'M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z',
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 3 } },
  ]),
  Send: I(['M22 2 11 13', 'M22 2l-7 20-4-9-9-4 20-7z']),
  Filter: I(['M22 3H2l8 9.46V19l4 2v-8.54L22 3z']),
  Sparkles: I([
    'M12 3l1.6 4.2L18 9l-4.4 1.8L12 15l-1.6-4.2L6 9l4.4-1.8L12 3z',
    'M19 14l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8.8-2z',
  ]),
  ChevronsUpDown: I(['M7 15l5 5 5-5', 'M7 9l5-5 5 5']),
  LogOut: I([
    'M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4',
    'M16 17l5-5-5-5', 'M21 12H9',
  ]),
  Menu: I(['M3 12h18', 'M3 6h18', 'M3 18h18']),
  Wifi: I([
    'M5 13a10 10 0 0 1 14 0', 'M2 9a14 14 0 0 1 20 0',
    'M8.5 16.5a5 5 0 0 1 7 0', 'M12 20h0',
  ]),
  Battery: I([
    { tag: 'rect', attrs: { x: 1, y: 7, width: 18, height: 10, rx: 2 } },
    { tag: 'rect', attrs: { x: 3, y: 9, width: 14, height: 6, rx: 0.5, fill: 'currentColor', stroke: 'none' } },
    'M23 11v2',
  ]),
  Signal: I([
    'M2 22h.01', 'M7 18v4', 'M12 14v8', 'M17 10v12', 'M22 6v16',
  ]),
  Link2: I([
    'M9 17H7A5 5 0 0 1 7 7h2', 'M15 7h2a5 5 0 1 1 0 10h-2', 'M8 12h8',
  ]),
  Mail: I([
    { tag: 'rect', attrs: { x: 2, y: 4, width: 20, height: 16, rx: 2 } },
    'M22 6 12 13 2 6',
  ]),
  Phone: I([
    'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.33 1.85.57 2.81.7A2 2 0 0 1 22 16.92z',
  ]),
  Shield: I([
    'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z',
  ]),
  Key: I([
    { tag: 'circle', attrs: { cx: 8, cy: 15, r: 4 } },
    'M10.85 12.15 19 4', 'M18 5l2 2', 'M15 8l3 3',
  ]),
  AtSign: I([
    { tag: 'circle', attrs: { cx: 12, cy: 12, r: 4 } },
    'M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8',
  ]),
};
