// Inline SVG icons. All 1.5px stroke, currentColor.
const ic = (path, size=18) => ({ className, style }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round" className={className} style={style}>{path}</svg>
);

const IconLogo = ({ size = 22, fg, bg }) => (
  <img
    src="assets/logo-icon.png?v=2"
    alt="BinGest"
    width={size}
    height={size}
    style={{
      width: size, height: size,
      objectFit: "contain",
      display: "block",
      flex: "0 0 auto",
    }}
  />
);

const IconDashboard = ic(<><rect x="3" y="3" width="7" height="9" rx="1.5"/><rect x="14" y="3" width="7" height="5" rx="1.5"/><rect x="14" y="12" width="7" height="9" rx="1.5"/><rect x="3" y="16" width="7" height="5" rx="1.5"/></>);
const IconUsers = ic(<><circle cx="9" cy="8" r="3.2"/><path d="M3 20c.5-3 3-5 6-5s5.5 2 6 5"/><circle cx="17" cy="9" r="2.5"/><path d="M16 20c.3-2 1.6-3.5 4-3.5"/></>);
const IconClock = ic(<><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3.5 2.2"/></>);
const IconBuilding = ic(<><rect x="4" y="3" width="16" height="18" rx="1.5"/><path d="M8 7h2M14 7h2M8 11h2M14 11h2M8 15h2M14 15h2M10 21v-3h4v3"/></>);
const IconClipboard = ic(<><rect x="6" y="4" width="12" height="17" rx="1.5"/><rect x="9" y="2" width="6" height="3.5" rx="1"/><path d="M9.5 11h5M9.5 14h5M9.5 17h3"/></>);
const IconTeam = ic(<><circle cx="8" cy="9" r="2.5"/><circle cx="16" cy="9" r="2.5"/><path d="M3 19c.4-2.5 2.4-4.5 5-4.5s4.6 2 5 4.5M13 19c.4-2.5 2.4-4.5 5-4.5s2.5 1 2.5 1.5"/></>);
const IconWallet = ic(<><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18M16.5 14.5h.01"/></>);
const IconReport = ic(<><path d="M5 21V5a2 2 0 0 1 2-2h7l5 5v13a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/><path d="M14 3v5h5M8 13l2.5 2.5L15 11M8 17h6"/></>);
const IconGear = ic(<><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></>);
const IconDownload = ic(<><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"/></>);
const IconCheck = ic(<><path d="M20 6L9 17l-5-5"/></>);
const IconArrow = ic(<><path d="M5 12h14M13 5l7 7-7 7"/></>);
const IconArrowDown = ic(<><path d="M12 5v14M5 12l7 7 7-7"/></>);
const IconX = ic(<><path d="M18 6L6 18M6 6l12 12"/></>);
const IconSpark = ic(<><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/></>);
const IconBolt = ic(<><path d="M13 2L4 14h7l-1 8 9-12h-7l1-8z"/></>);
const IconPlay = ic(<><path d="M6 4l14 8-14 8V4z" fill="currentColor"/></>);
const IconChevron = ic(<><path d="M9 18l6-6-6-6"/></>);
const IconChevronDown = ic(<><path d="M6 9l6 6 6-6"/></>);
const IconAlert = ic(<><circle cx="12" cy="12" r="9"/><path d="M12 7v6M12 16.5h.01"/></>);
const IconMinus = ic(<><path d="M5 12h14"/></>);
const IconPlus = ic(<><path d="M12 5v14M5 12h14"/></>);
const IconHelmet = ic(<><path d="M3 16c0-5 4-8 9-8s9 3 9 8v2H3v-2zM10 8V5h4v3"/></>);
const IconWhatsApp = ic(<><path d="M20.5 12a8.5 8.5 0 1 1-15.7 4.5L3 21l4.7-1.7A8.5 8.5 0 0 1 20.5 12z"/><path d="M9 9.5c.2-.5.7-1 1.3-1 .4 0 .7.3 1 1l.5 1.2c.2.5.1.8-.2 1l-.5.3c-.2.1-.2.3-.1.5.4 1 1.3 1.9 2.3 2.3.2.1.4.1.5-.1l.3-.5c.2-.3.5-.4 1-.2l1.2.5c.7.3 1 .6 1 1 0 .6-.5 1.1-1 1.3-.9.3-1.9.2-3-.3-1.4-.7-2.7-1.9-3.4-3.4-.5-1.1-.6-2.1-.3-3z"/></>);
const IconBrazil = ic(<><circle cx="12" cy="12" r="9"/><path d="M3 12c3-3 15-3 18 0M3 12c3 3 15 3 18 0"/></>);

Object.assign(window, {
  ic, IconLogo, IconDashboard, IconUsers, IconClock, IconBuilding, IconClipboard,
  IconTeam, IconWallet, IconReport, IconGear, IconDownload, IconCheck, IconArrow, IconArrowDown,
  IconX, IconSpark, IconBolt, IconPlay, IconChevron, IconChevronDown, IconAlert, IconMinus, IconPlus, IconHelmet, IconWhatsApp, IconBrazil
});
