// Shared primitives + tiny icon helper const { useEffect, useRef, useState, useMemo } = React; // Lucide icon helper — renders an inline SVG by name from window.lucide function Icon({ name, className = "w-5 h-5", strokeWidth = 1.8 }) { const ref = useRef(null); useEffect(() => { if (!ref.current) return; const lib = window.lucide; if (!lib) return; const icons = lib.icons || lib; const def = icons[name] || icons[name?.replace(/-([a-z])/g, (_, c) => c.toUpperCase())] || icons[name?.replace(/(^|-)([a-z])/g, (_, __, c) => c.toUpperCase())]; if (!def) return; const create = lib.createElement || ((d) => { const [tag, attrs, children] = d; const ns = "http://www.w3.org/2000/svg"; const el = document.createElementNS(ns, tag); Object.entries(attrs || {}).forEach(([k, v]) => el.setAttribute(k, v)); (children || []).forEach((c) => el.appendChild(create(c))); return el; }); ref.current.innerHTML = ""; const svg = create(def); svg.setAttribute("stroke-width", strokeWidth); svg.setAttribute("class", className); ref.current.appendChild(svg); }, [name, className, strokeWidth]); return