// Lucide-style line icons at 16px. Stroke-based, no fills.
// All accept {size, className, style} props and inherit currentColor.

const ic = (paths, viewBox = "0 0 24 24") => ({ size = 16, className = "", style }) =>
  <svg width={size} height={size} viewBox={viewBox} fill="none" stroke="currentColor"
    strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"
    className={className} style={style} aria-hidden="true">
    {paths}
  </svg>;

const IShield     = ic(<><path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6l8-3z"/></>);
const IUsers      = ic(<><circle cx="9" cy="8" r="3.2"/><path d="M2.5 19c.5-3 3.2-4.5 6.5-4.5S15 16 15.5 19"/><path d="M16 10a3 3 0 0 0 0-6"/><path d="M22 19c-.3-2-1.7-3.4-4-4"/></>);
const ICoins      = ic(<><ellipse cx="9" cy="8" rx="6" ry="2.4"/><path d="M3 8v4c0 1.3 2.7 2.4 6 2.4s6-1.1 6-2.4V8"/><ellipse cx="15" cy="16" rx="6" ry="2.4"/><path d="M9 16v4c0 1.3 2.7 2.4 6 2.4s6-1.1 6-2.4v-4"/></>);
const IGraph      = ic(<><path d="M3 3v18h18"/><path d="M7 14l3-4 3 3 5-7"/></>);
const IGitMerge   = ic(<><circle cx="6" cy="6" r="2"/><circle cx="6" cy="18" r="2"/><circle cx="18" cy="12" r="2"/><path d="M6 8v8"/><path d="M8 6c0 4 4 6 8 6"/></>);
const ICalendar   = ic(<><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18"/><path d="M8 3v4M16 3v4"/></>);
const ILock       = ic(<><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></>);
const ISettings   = ic(<><circle cx="12" cy="12" r="2.6"/><path d="M19.4 12a1 1 0 0 0 .2.6l1.1 1.4-1.5 2.6-1.7-.4a1 1 0 0 0-.7.1l-1 .6a1 1 0 0 0-.4.6L15 19h-3l-.4-1.5a1 1 0 0 0-.4-.6l-1-.6a1 1 0 0 0-.7-.1l-1.7.4-1.5-2.6 1.1-1.4a1 1 0 0 0 .2-.6 1 1 0 0 0-.2-.6L5.3 10l1.5-2.6 1.7.4a1 1 0 0 0 .7-.1l1-.6a1 1 0 0 0 .4-.6L11 5h3l.4 1.5a1 1 0 0 0 .4.6l1 .6a1 1 0 0 0 .7.1l1.7-.4 1.5 2.6-1.1 1.4a1 1 0 0 0-.2.6z"/></>);

const ISearch     = ic(<><circle cx="11" cy="11" r="6.5"/><path d="M20 20l-3.6-3.6"/></>);
const IFilter     = ic(<><path d="M3 5h18l-7 8v7l-4-2v-5L3 5z"/></>);
const IDotsV      = ic(<><circle cx="12" cy="5" r="1.2"/><circle cx="12" cy="12" r="1.2"/><circle cx="12" cy="19" r="1.2"/></>);
const IPencil     = ic(<><path d="M4 20l4-1 11-11-3-3L5 16l-1 4z"/></>);
const IEye        = ic(<><path d="M2 12c2.5-4.5 6-7 10-7s7.5 2.5 10 7c-2.5 4.5-6 7-10 7s-7.5-2.5-10-7z"/><circle cx="12" cy="12" r="2.6"/></>);
const ICheck      = ic(<><path d="M4 12l5 5 11-11"/></>);
const IX          = ic(<><path d="M5 5l14 14M19 5L5 19"/></>);
const IArrowUp    = ic(<><path d="M12 19V5"/><path d="M5 12l7-7 7 7"/></>);
const IArrowDown  = ic(<><path d="M12 5v14"/><path d="M19 12l-7 7-7-7"/></>);
const IArrowRight = ic(<><path d="M5 12h14"/><path d="M12 5l7 7-7 7"/></>);
const IExternal   = ic(<><path d="M14 4h6v6"/><path d="M20 4l-9 9"/><path d="M20 14v6H4V4h6"/></>);
const IDownload   = ic(<><path d="M12 4v12"/><path d="M6 10l6 6 6-6"/><path d="M4 20h16"/></>);
const IChevronD   = ic(<><path d="M6 9l6 6 6-6"/></>);
const IChevronR   = ic(<><path d="M9 6l6 6-6 6"/></>);
const ICmd        = ic(<><path d="M9 6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3z"/></>);
const IBolt       = ic(<><path d="M13 2L4 14h7l-1 8 9-12h-7l1-8z"/></>);
const IAlertT     = ic(<><path d="M12 4l10 17H2L12 4z"/><path d="M12 10v5"/><circle cx="12" cy="18.4" r=".8" fill="currentColor" stroke="none"/></>);
const IClock      = ic(<><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></>);
const ICheckCirc  = ic(<><circle cx="12" cy="12" r="9"/><path d="M8 12.5l3 3 5-6"/></>);
const ISend       = ic(<><path d="M22 3L2 11l8 3 3 8 9-19z"/><path d="M10 14l4-4"/></>);
const IUpload     = ic(<><path d="M12 20V8"/><path d="M6 14l6-6 6 6"/><path d="M4 20h16"/></>);
const ICopy       = ic(<><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M4 16V6a2 2 0 0 1 2-2h10"/></>);
const ICircle     = ic(<><circle cx="12" cy="12" r="9"/></>);
const ILink       = ic(<><path d="M10 14a4 4 0 0 0 6 0l3-3a4 4 0 0 0-6-6l-1 1"/><path d="M14 10a4 4 0 0 0-6 0l-3 3a4 4 0 0 0 6 6l1-1"/></>);
const ILocate     = ic(<><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3"/></>);
const IFile       = ic(<><path d="M6 3h9l4 4v14H6V3z"/><path d="M14 3v5h5"/></>);

// Tiny chain glyphs (placeholders, no brand logos)
const ChainGlyph = ({ chain }) => {
  const map = {
    "Ethereum": { fg: "var(--fg-2)", label: "Ξ" },
    "Base":     { fg: "var(--accent)", label: "B" },
    "Solana":   { fg: "var(--fg-2)", label: "S" },
    "Polygon":  { fg: "var(--fg-2)", label: "P" },
    "Bitcoin":  { fg: "var(--amber-fg)", label: "₿" },
  };
  const m = map[chain] || { fg: "var(--fg-4)", label: "?" };
  return <span className="chain-glyph" style={{ color: m.fg }}>{m.label}</span>;
};

Object.assign(window, {
  IShield, IUsers, ICoins, IGraph, IGitMerge, ICalendar, ILock, ISettings,
  ISearch, IFilter, IDotsV, IPencil, IEye, ICheck, IX, IArrowUp, IArrowDown,
  IArrowRight, IExternal, IDownload, IChevronD, IChevronR, ICmd, IBolt,
  IAlertT, IClock, ICheckCirc, ISend, IUpload, ICopy, ICircle, ILink, ILocate,
  IFile, ChainGlyph,
});
