// icons.jsx — minimal stroke icon set as React components. -> window.
// All inherit currentColor; size via `s` prop.

const Ic = (path, vb = '0 0 24 24') => function Icon({ s = 24, style, stroke = 2, fill = 'none' }) {
  return (
    <svg width={s} height={s} viewBox={vb} fill={fill} stroke={fill === 'none' ? 'currentColor' : 'none'}
      strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round"
      style={{ display: 'block', flexShrink: 0, ...style }}
      dangerouslySetInnerHTML={{ __html: path }} />
  );
};

const IconBack    = Ic('<path d="M15 5l-7 7 7 7"/>');
const IconClose   = Ic('<path d="M6 6l12 12M18 6L6 18"/>');
const IconPlus    = Ic('<path d="M12 5v14M5 12h14"/>');
const IconMinus   = Ic('<path d="M5 12h14"/>');
const IconCheck   = Ic('<path d="M5 12.5l4.5 4.5L19 6.5"/>');
const IconChevron = Ic('<path d="M9 6l6 6-6 6"/>');
const IconCamera  = Ic('<path d="M3 8.5A2.5 2.5 0 015.5 6h1.2a1 1 0 00.83-.45l.94-1.4A1 1 0 019.3 3.7h5.4a1 1 0 01.83.45l.94 1.4a1 1 0 00.83.45h1.2A2.5 2.5 0 0121 8.5v9A2.5 2.5 0 0118.5 20h-13A2.5 2.5 0 013 17.5z"/><circle cx="12" cy="13" r="3.4"/>');
const IconReceipt = Ic('<path d="M6 3h12v18l-2.2-1.4L13.6 21 12 19.6 10.4 21 8.2 19.6 6 21z"/><path d="M9 8h6M9 12h6"/>');
const IconScan    = Ic('<path d="M4 8V6a2 2 0 012-2h2M16 4h2a2 2 0 012 2v2M20 16v2a2 2 0 01-2 2h-2M8 20H6a2 2 0 01-2-2v-2"/><path d="M4 12h16"/>');
const IconCopy    = Ic('<rect x="9" y="9" width="11" height="11" rx="2.2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/>');
const IconEdit    = Ic('<path d="M4 20h4L19 9l-4-4L4 16z"/><path d="M14 6l4 4"/>');
const IconPeople  = Ic('<circle cx="9" cy="8" r="3.2"/><path d="M3.5 19a5.5 5.5 0 0111 0"/><path d="M16 5.2a3.2 3.2 0 010 6M16.5 19a5.5 5.5 0 00-2-4.3"/>');
const IconSplit   = Ic('<path d="M6 3v6a3 3 0 003 3h6a3 3 0 013 3v6M6 21v-6"/><circle cx="6" cy="4" r="0.5"/>');
// Traditional "split": one line that forks into two arrows.
const IconDivvy   = Ic('<path d="M21 17h-8l-3.5-5H3"/><path d="M21 7h-8l-2 2.9"/><path d="M17.5 10.5L21 7l-3.5-3.5"/><path d="M17.5 20.5L21 17l-3.5-3.5"/>');
const IconSparkle = Ic('<path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z"/>', '0 0 24 20');
const IconCheckCircle = Ic('<circle cx="12" cy="12" r="9"/><path d="M8.5 12.5l2.5 2.5 4.5-5"/>');
const IconDollar  = Ic('<path d="M12 3v18M16 7.5C16 5.6 14.2 4 12 4S8 5.6 8 7.5 9.8 11 12 11s4 1.4 4 3.5S14.2 18 12 18s-4-1.6-4-3.5"/>');
const IconArrowR  = Ic('<path d="M5 12h14M13 6l6 6-6 6"/>');
const IconTag     = Ic('<path d="M3 11.5V5a2 2 0 012-2h6.5a2 2 0 011.4.6l8 8a2 2 0 010 2.8l-6.5 6.5a2 2 0 01-2.8 0l-8-8A2 2 0 013 11.5z"/><circle cx="7.5" cy="7.5" r="1.3" fill="currentColor" stroke="none"/>');
const IconUndo    = Ic('<path d="M9 7H5V3M5 7a8 8 0 1 1-2 5.3"/>');
const IconClock   = Ic('<circle cx="12" cy="12" r="9"/><path d="M12 7.5V12l3 2"/>');
const IconGear    = Ic('<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>');
const IconTrash   = Ic('<path d="M4 7h16M9 7V4.5A1.5 1.5 0 0110.5 3h3A1.5 1.5 0 0115 4.5V7M6 7l1 13a1.5 1.5 0 001.5 1.4h7A1.5 1.5 0 0017 20L18 7"/>');
const IconUsers   = IconPeople;
const IconCash    = Ic('<rect x="2.5" y="6" width="19" height="12" rx="2.5"/><circle cx="12" cy="12" r="2.6"/><path d="M6 9.5v5M18 9.5v5"/>');

// Brand mark: one "tab" (a disc / coin) divvied into shares. Three wedges with
// clean gaps — the act of splitting a single bill among people, no initials.
function IconLogo({ s = 24, style }) {
  return (
    <svg width={s} height={s} viewBox="0 0 24 24" fill="currentColor"
      style={{ display: 'block', flexShrink: 0, ...style }}>
      <path d="M12 12 L13.87 3.20 A9 9 0 0 1 20.56 14.78 Z" />
      <path d="M12 12 L18.69 18.02 A9 9 0 0 1 5.31 18.02 Z" />
      <path d="M12 12 L3.44 14.78 A9 9 0 0 1 10.13 3.20 Z" />
    </svg>
  );
}

Object.assign(window, {
  IconBack, IconClose, IconPlus, IconMinus, IconCheck, IconChevron, IconCamera,
  IconReceipt, IconScan, IconCopy, IconEdit, IconPeople, IconSplit, IconSparkle,
  IconCheckCircle, IconDollar, IconArrowR, IconTag, IconUndo,
  IconClock, IconGear, IconTrash, IconUsers, IconCash, IconLogo, IconDivvy,
});
