// Lumen — Shared icons (Lucide-style line icons, 1.6 stroke)
const Icon = ({ d, size = 16, stroke = 1.6, fill = "none", style, viewBox = "0 0 24 24", className }) => (
  <svg width={size} height={size} viewBox={viewBox} fill={fill} stroke="currentColor"
       strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round" style={style} className={className}>
    {d}
  </svg>
);

const I = {
  home: (p) => <Icon {...p} d={<><path d="M3 11l9-8 9 8"/><path d="M5 10v10h14V10"/></>}/>,
  book: (p) => <Icon {...p} d={<><path d="M4 5a2 2 0 0 1 2-2h13v18H6a2 2 0 0 1-2-2z"/><path d="M4 17h15"/></>}/>,
  play: (p) => <Icon {...p} d={<polygon points="6,4 20,12 6,20" fill="currentColor" stroke="none"/>}/>,
  playOutline: (p) => <Icon {...p} d={<polygon points="6,4 20,12 6,20"/>}/>,
  pause: (p) => <Icon {...p} d={<><rect x="6" y="4" width="4" height="16" fill="currentColor" stroke="none"/><rect x="14" y="4" width="4" height="16" fill="currentColor" stroke="none"/></>}/>,
  bar: (p) => <Icon {...p} d={<><line x1="4" y1="20" x2="4" y2="13"/><line x1="10" y1="20" x2="10" y2="8"/><line x1="16" y1="20" x2="16" y2="15"/><line x1="22" y1="20" x2="22" y2="4"/></>}/>,
  users: (p) => <Icon {...p} d={<><circle cx="9" cy="8" r="3.5"/><path d="M2.5 20c.7-3.4 3.4-5.5 6.5-5.5s5.8 2.1 6.5 5.5"/><circle cx="17" cy="9" r="2.5"/><path d="M16 14.5c2.7.3 4.7 2.2 5.4 4.7"/></>}/>,
  cash: (p) => <Icon {...p} d={<><rect x="2.5" y="6" width="19" height="13" rx="2"/><circle cx="12" cy="12.5" r="2.5"/><path d="M6 9v.01M18 16v.01"/></>}/>,
  layers: (p) => <Icon {...p} d={<><polygon points="12,3 22,8 12,13 2,8"/><polyline points="2,13 12,18 22,13"/><polyline points="2,18 12,23 22,18"/></>}/>,
  chat: (p) => <Icon {...p} d={<path d="M21 12a8 8 0 0 1-12.4 6.7L3 20l1.4-5.2A8 8 0 1 1 21 12z"/>}/>,
  cog: (p) => <Icon {...p} d={<><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.6 1.6 0 0 0 .3 1.7l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.7-.3 1.6 1.6 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.6 1.6 0 0 0-1.1-1.4 1.6 1.6 0 0 0-1.7.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.7 1.6 1.6 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1A1.6 1.6 0 0 0 4.6 9a1.6 1.6 0 0 0-.3-1.7l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.7.3H9a1.6 1.6 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1A1.6 1.6 0 0 0 15 4.6a1.6 1.6 0 0 0 1.7-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.7V9a1.6 1.6 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1z"/></>}/>,
  search: (p) => <Icon {...p} d={<><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.5" y2="16.5"/></>}/>,
  bell: (p) => <Icon {...p} d={<><path d="M6 8a6 6 0 1 1 12 0c0 7 3 7 3 9H3c0-2 3-2 3-9z"/><path d="M10 21a2 2 0 0 0 4 0"/></>}/>,
  plus: (p) => <Icon {...p} d={<><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></>}/>,
  arrowRight: (p) => <Icon {...p} d={<><line x1="5" y1="12" x2="19" y2="12"/><polyline points="13,5 19,12 13,19"/></>}/>,
  arrowUp: (p) => <Icon {...p} d={<polyline points="6,15 12,9 18,15"/>}/>,
  arrowDown: (p) => <Icon {...p} d={<polyline points="6,9 12,15 18,9"/>}/>,
  check: (p) => <Icon {...p} d={<polyline points="4,12 10,18 20,6"/>}/>,
  x: (p) => <Icon {...p} d={<><line x1="6" y1="6" x2="18" y2="18"/><line x1="6" y1="18" x2="18" y2="6"/></>}/>,
  chev: (p) => <Icon {...p} d={<polyline points="9,6 15,12 9,18"/>}/>,
  chevDown: (p) => <Icon {...p} d={<polyline points="6,9 12,15 18,9"/>}/>,
  drag: (p) => <Icon {...p} d={<><circle cx="9" cy="6" r="1.2" fill="currentColor"/><circle cx="9" cy="12" r="1.2" fill="currentColor"/><circle cx="9" cy="18" r="1.2" fill="currentColor"/><circle cx="15" cy="6" r="1.2" fill="currentColor"/><circle cx="15" cy="12" r="1.2" fill="currentColor"/><circle cx="15" cy="18" r="1.2" fill="currentColor"/></>}/>,
  more: (p) => <Icon {...p} d={<><circle cx="5" cy="12" r="1.4" fill="currentColor"/><circle cx="12" cy="12" r="1.4" fill="currentColor"/><circle cx="19" cy="12" r="1.4" fill="currentColor"/></>}/>,
  edit: (p) => <Icon {...p} d={<><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4z"/></>}/>,
  video: (p) => <Icon {...p} d={<><rect x="2" y="6" width="14" height="12" rx="2"/><polygon points="22,8 16,12 22,16" fill="currentColor"/></>}/>,
  text: (p) => <Icon {...p} d={<><line x1="6" y1="7" x2="18" y2="7"/><line x1="6" y1="12" x2="18" y2="12"/><line x1="6" y1="17" x2="14" y2="17"/></>}/>,
  quiz: (p) => <Icon {...p} d={<><circle cx="12" cy="12" r="9"/><path d="M9 9.5a3 3 0 0 1 5.5 1.5c0 1.5-2.5 1.8-2.5 3.5"/><line x1="12" y1="17.5" x2="12.01" y2="17.5"/></>}/>,
  download: (p) => <Icon {...p} d={<><path d="M12 4v12"/><polyline points="6,12 12,18 18,12"/><line x1="4" y1="20" x2="20" y2="20"/></>}/>,
  bookmark: (p) => <Icon {...p} d={<polygon points="6,3 18,3 18,21 12,17 6,21"/>}/>,
  filter: (p) => <Icon {...p} d={<polygon points="3,4 21,4 14,13 14,20 10,18 10,13"/>}/>,
  sparkle: (p) => <Icon {...p} d={<><path d="M12 3v3M12 18v3M3 12h3M18 12h3"/><path d="M12 7l1.5 3.5L17 12l-3.5 1.5L12 17l-1.5-3.5L7 12l3.5-1.5z"/></>}/>,
  globe: (p) => <Icon {...p} d={<><circle cx="12" cy="12" r="9"/><line x1="3" y1="12" x2="21" y2="12"/><path d="M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></>}/>,
  clock: (p) => <Icon {...p} d={<><circle cx="12" cy="12" r="9"/><polyline points="12,7 12,12 15,14"/></>}/>,
  inbox: (p) => <Icon {...p} d={<><polyline points="22,12 16,12 14,15 10,15 8,12 2,12"/><path d="M5.5 5h13l3.5 7v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-6z"/></>}/>,
  star: (p) => <Icon {...p} d={<polygon points="12,3 15,9 22,10 17,15 18,22 12,18 6,22 7,15 2,10 9,9"/>}/>,
  zap: (p) => <Icon {...p} d={<polygon points="13,2 4,14 11,14 9,22 20,10 13,10"/>}/>,
  tag: (p) => <Icon {...p} d={<><path d="M20 12L12 4H4v8l8 8z"/><circle cx="8" cy="8" r="1.4" fill="currentColor"/></>}/>,
  trend: (p) => <Icon {...p} d={<><polyline points="3,17 9,11 13,15 21,7"/><polyline points="14,7 21,7 21,14"/></>}/>,
  lock: (p) => <Icon {...p} d={<><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></>}/>,
  external: (p) => <Icon {...p} d={<><path d="M14 4h6v6"/><line x1="20" y1="4" x2="11" y2="13"/><path d="M19 13v6H5V5h6"/></>}/>,
  upload: (p) => <Icon {...p} d={<><path d="M12 18V6"/><polyline points="6,10 12,4 18,10"/><line x1="4" y1="20" x2="20" y2="20"/></>}/>,
  trash: (p) => <Icon {...p} d={<><polyline points="3,6 21,6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/></>}/>,
  copy: (p) => <Icon {...p} d={<><rect x="8" y="8" width="13" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/></>}/>,
  eye: (p) => <Icon {...p} d={<><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></>}/>,
  send: (p) => <Icon {...p} d={<><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22,2 15,22 11,13 2,9"/></>}/>,
  fullscreen: (p) => <Icon {...p} d={<><polyline points="4,9 4,4 9,4"/><polyline points="15,4 20,4 20,9"/><polyline points="20,15 20,20 15,20"/><polyline points="9,20 4,20 4,15"/></>}/>,
  cap: (p) => <Icon {...p} d={<><path d="M22 10L12 4 2 10l10 6 10-6z"/><path d="M6 12v5c0 1.6 2.7 3 6 3s6-1.4 6-3v-5"/></>}/>,
  closeCircle: (p) => <Icon {...p} d={<><circle cx="12" cy="12" r="9"/><line x1="9" y1="9" x2="15" y2="15"/><line x1="15" y1="9" x2="9" y2="15"/></>}/>,
  checkCircle: (p) => <Icon {...p} d={<><circle cx="12" cy="12" r="9"/><polyline points="8,12 11,15 16,9"/></>}/>,
};

window.I = I;
window.Icon = Icon;
