/* Thin-line 1.5px Lucide-style icon set */
const Icon = ({ name, size = 20, color = 'currentColor', style, strokeWidth = 1.5 }) => {
  const p = {
    width: size, height: size, viewBox: '0 0 24 24',
    fill: 'none', stroke: color, strokeWidth,
    strokeLinecap: 'round', strokeLinejoin: 'round', style,
  };
  const S = ({ children }) => <svg {...p}>{children}</svg>;
  switch (name) {
    case 'search':        return <S><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></S>;
    case 'arrow-right':   return <S><path d="M5 12h14M13 5l7 7-7 7"/></S>;
    case 'arrow-left':    return <S><path d="M19 12H5M11 5l-7 7 7 7"/></S>;
    case 'arrow-down':    return <S><path d="M12 5v14M5 13l7 7 7-7"/></S>;
    case 'check':         return <S><path d="M5 12l5 5 9-11"/></S>;
    case 'filter':        return <S><path d="M4 6h16M7 12h10M10 18h4"/></S>;
    case 'chart':         return <S><path d="M3 3v18h18"/><path d="M7 14l4-4 4 3 5-7"/></S>;
    case 'doc':           return <S><path d="M6 2h9l5 5v15H6z"/><path d="M15 2v5h5M9 13h6M9 17h6M9 9h3"/></S>;
    case 'menu':          return <S><path d="M4 6h16M4 12h16M4 18h16"/></S>;
    case 'close':         return <S><path d="M6 6l12 12M18 6L6 18"/></S>;
    case 'external':      return <S><path d="M7 17L17 7M9 7h8v8"/></S>;
    case 'chevron-right': return <S><path d="M9 6l6 6-6 6"/></S>;
    case 'chevron-down':  return <S><path d="M6 9l6 6 6-6"/></S>;
    case 'globe':         return <S><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></S>;
    case 'stack':         return <S><path d="M4 8l8-4 8 4-8 4-8-4zM4 12l8 4 8-4M4 16l8 4 8-4"/></S>;
    case 'target':        return <S><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1.5" fill={color}/></S>;
    case 'settings':      return <S><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M2 12h3M19 12h3M4.9 19.1l2.1-2.1M17 7l2.1-2.1"/></S>;
    case 'balance':       return <S><path d="M12 3v18M6 7h12M6 7l-3 7a3 3 0 0 0 6 0zM18 7l-3 7a3 3 0 0 0 6 0z"/></S>;
    case 'spark':         return <S><path d="M3 17l6-6 4 4 8-10"/></S>;
    case 'download':      return <S><path d="M12 3v14M6 13l6 6 6-6M4 21h16"/></S>;
    case 'map-pin':       return <S><path d="M12 22s7-7 7-13a7 7 0 0 0-14 0c0 6 7 13 7 13z"/><circle cx="12" cy="9" r="2.5"/></S>;
    case 'copy':          return <S><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"/></S>;
    case 'plus':          return <S><path d="M12 5v14M5 12h14"/></S>;
    case 'dot':           return <S><circle cx="12" cy="12" r="3" fill={color}/></S>;
    default: return null;
  }
};
window.Icon = Icon;
