// icons.jsx — AFEX PAY icon set (stroke, 1.6, 24 grid)
const Ic = ({ d, size = 20, fill, stroke = 1.6, children, ...p }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill={fill || "none"}
       stroke="currentColor" strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round" {...p}>
    {d ? <path d={d} /> : children}
  </svg>
);

const Icons = {
  grid: (p) => <Ic {...p}><rect x="3" y="3" width="7" height="7" rx="1.5"/><rect x="14" y="3" width="7" height="7" rx="1.5"/><rect x="3" y="14" width="7" height="7" rx="1.5"/><rect x="14" y="14" width="7" height="7" rx="1.5"/></Ic>,
  cart: (p) => <Ic {...p}><circle cx="9" cy="20" r="1.4"/><circle cx="18" cy="20" r="1.4"/><path d="M2 3h2.2l2 12.5a1.5 1.5 0 0 0 1.5 1.2h9.3a1.5 1.5 0 0 0 1.5-1.2L20.5 7H6"/></Ic>,
  swap: (p) => <Ic {...p} d="M7 4 3 8l4 4M3 8h14M17 20l4-4-4-4M21 16H7"/>,
  percent: (p) => <Ic {...p}><path d="M19 5 5 19"/><circle cx="7.5" cy="7.5" r="2.5"/><circle cx="16.5" cy="16.5" r="2.5"/></Ic>,
  wallet: (p) => <Ic {...p}><path d="M3 7a2 2 0 0 1 2-2h13a1 1 0 0 1 1 1v2"/><path d="M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-8a1 1 0 0 0-1-1H5a2 2 0 0 1-2-2Z"/><circle cx="16.5" cy="12.5" r="1.1" fill="currentColor" stroke="none"/></Ic>,
  plug: (p) => <Ic {...p} d="M9 2v6M15 2v6M6 8h12v3a6 6 0 0 1-12 0V8ZM12 17v5"/>,
  code: (p) => <Ic {...p} d="m8 6-6 6 6 6M16 6l6 6-6 6"/>,
  chart: (p) => <Ic {...p}><path d="M3 3v18h18"/><path d="M7 14l3-4 3 3 4-6"/></Ic>,
  gear: (p) => <Ic {...p}><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1"/></Ic>,
  help: (p) => <Ic {...p}><circle cx="12" cy="12" r="9"/><path d="M9.5 9.5a2.5 2.5 0 0 1 4.5 1.5c0 1.5-2 1.8-2 3"/><circle cx="12" cy="16.5" r="0.6" fill="currentColor" stroke="none"/></Ic>,
  users: (p) => <Ic {...p}><circle cx="9" cy="8" r="3.2"/><path d="M3.5 19a5.5 5.5 0 0 1 11 0M16 5.2a3 3 0 0 1 0 5.8M21 19a5 5 0 0 0-3.5-4.8"/></Ic>,
  shield: (p) => <Ic {...p}><path d="M12 3 5 6v5c0 4.2 3 7.5 7 9 4-1.5 7-4.8 7-9V6l-7-3Z"/><path d="m9 12 2 2 4-4"/></Ic>,
  bell: (p) => <Ic {...p}><path d="M18 9a6 6 0 0 0-12 0c0 5-2 6-2 6h16s-2-1-2-6"/><path d="M10.5 19a2 2 0 0 0 3 0"/></Ic>,
  search: (p) => <Ic {...p}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.2-3.2"/></Ic>,
  bolt: (p) => <Ic {...p} fill="currentColor" stroke="none" d="M13 2 4 14h6l-1 8 9-12h-6l1-8Z"/>,
  arrowUp: (p) => <Ic {...p} d="M12 19V5M6 11l6-6 6 6"/>,
  arrowDown: (p) => <Ic {...p} d="M12 5v14M6 13l6 6 6-6"/>,
  arrowRight: (p) => <Ic {...p} d="M5 12h14M13 6l6 6-6 6"/>,
  chevR: (p) => <Ic {...p} d="m9 6 6 6-6 6"/>,
  chevD: (p) => <Ic {...p} d="m6 9 6 6 6-6"/>,
  chevL: (p) => <Ic {...p} d="m15 6-6 6 6 6"/>,
  check: (p) => <Ic {...p} d="M5 12.5 10 17 19 7"/>,
  checkCircle: (p) => <Ic {...p}><circle cx="12" cy="12" r="9"/><path d="m8.5 12 2.5 2.5 4.5-5"/></Ic>,
  x: (p) => <Ic {...p} d="M6 6 18 18M18 6 6 18"/>,
  xCircle: (p) => <Ic {...p}><circle cx="12" cy="12" r="9"/><path d="m9 9 6 6M15 9l-6 6"/></Ic>,
  warn: (p) => <Ic {...p}><path d="M10.3 3.8 2.5 17a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 3.8a2 2 0 0 0-3.4 0Z"/><path d="M12 9v4"/><circle cx="12" cy="16.5" r="0.5" fill="currentColor" stroke="none"/></Ic>,
  clock: (p) => <Ic {...p}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></Ic>,
  plus: (p) => <Ic {...p} d="M12 5v14M5 12h14"/>,
  filter: (p) => <Ic {...p} d="M3 5h18l-7 8v6l-4-2v-4L3 5Z"/>,
  download: (p) => <Ic {...p} d="M12 3v12M7 11l5 5 5-5M5 21h14"/>,
  copy: (p) => <Ic {...p}><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h8"/></Ic>,
  eye: (p) => <Ic {...p}><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="2.6"/></Ic>,
  eyeOff: (p) => <Ic {...p} d="M3 3l18 18M10.6 6.2A10 10 0 0 1 12 6c6.5 0 10 6 10 6a16 16 0 0 1-3.3 3.9M6.2 7.1A16 16 0 0 0 2 12s3.5 7 10 7a10 10 0 0 0 3.3-.5M9.9 9.9a3 3 0 0 0 4.2 4.2"/>,
  lock: (p) => <Ic {...p}><rect x="4" y="10" width="16" height="11" rx="2.5"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></Ic>,
  mail: (p) => <Ic {...p}><rect x="3" y="5" width="18" height="14" rx="2.5"/><path d="m4 7 8 6 8-6"/></Ic>,
  phone: (p) => <Ic {...p} d="M5 3h3l2 5-2.5 1.5a12 12 0 0 0 5 5L19 12l2 5v3a1 1 0 0 1-1 1A17 17 0 0 1 4 5a1 1 0 0 1 1-2Z"/>,
  building: (p) => <Ic {...p}><rect x="4" y="3" width="13" height="18" rx="1.5"/><path d="M17 8h3v13H4M8 7h2M8 11h2M8 15h2M13 7h0M13 11h0M13 15h0"/></Ic>,
  doc: (p) => <Ic {...p}><path d="M6 2h8l5 5v13a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"/><path d="M14 2v5h5M8.5 13h7M8.5 16.5h7"/></Ic>,
  bank: (p) => <Ic {...p} d="M3 9 12 4l9 5M4 9v8M9 9v8M15 9v8M20 9v8M3 21h18"/>,
  key: (p) => <Ic {...p}><circle cx="8" cy="8" r="4"/><path d="m11 11 8 8M16 16l2-2M19 19l1.5-1.5"/></Ic>,
  webhook: (p) => <Ic {...p}><path d="M9 7a3 3 0 1 1 4.5 2.6L11 14"/><path d="M7 13a3 3 0 1 0 3 5h4"/><path d="M16 11a3 3 0 1 1-2 5.3"/></Ic>,
  refresh: (p) => <Ic {...p} d="M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5"/>,
  logout: (p) => <Ic {...p} d="M15 17l5-5-5-5M20 12H9M12 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6"/>,
  pix: (p) => <Ic {...p}><path d="M12 3.5 7 8.5h2.5L12 11l2.5-2.5H17L12 3.5ZM3.5 12 8.5 7v2.5L11 12l-2.5 2.5V17L3.5 12ZM20.5 12 15.5 17v-2.5L13 12l2.5-2.5V7L20.5 12ZM12 20.5l5-5h-2.5L12 13l-2.5 2.5H7l5 5Z" fill="currentColor" stroke="none"/></Ic>,
  card: (p) => <Ic {...p}><rect x="2.5" y="5" width="19" height="14" rx="2.5"/><path d="M2.5 9.5h19M6 14.5h4"/></Ic>,
  barcode: (p) => <Ic {...p} d="M4 6v12M7 6v12M10 6v9M13 6v12M16 6v9M20 6v12"/>,
  trend: (p) => <Ic {...p} d="M3 17l5-5 4 3 8-9M16 6h5v5"/>,
  dot3: (p) => <Ic {...p}><circle cx="5" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1.4" fill="currentColor" stroke="none"/></Ic>,
  external: (p) => <Ic {...p} d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>,
  calendar: (p) => <Ic {...p}><rect x="3.5" y="5" width="17" height="16" rx="2"/><path d="M3.5 9.5h17M8 3v4M16 3v4"/></Ic>,
  whatsapp: (p) => <Ic {...p}><path d="M4 20l1.3-4A8 8 0 1 1 9 19.4L4 20Z"/><path d="M9 9.5c.3 2 1.5 3.2 3.5 3.8.6-.6.7-1.2 1.6-.8.5.2 1 .5 1.3.8"/></Ic>,
  chat: (p) => <Ic {...p} d="M4 5h16a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H9l-4 4v-4H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Z"/>,
  ticket: (p) => <Ic {...p} d="M4 7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2 2 2 0 0 0 0 4 2 2 0 0 1-2 2H6a2 2 0 0 1-2-2 2 2 0 0 0 0-4Z"/>,
  book: (p) => <Ic {...p} d="M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2V5ZM4 19a2 2 0 0 0 2 2h13"/>,
  money: (p) => <Ic {...p}><rect x="2.5" y="6" width="19" height="12" rx="2"/><circle cx="12" cy="12" r="2.6"/><path d="M6 9.5h0M18 14.5h0"/></Ic>,
  rocket: (p) => <Ic {...p} d="M5 15c-1.5 1.5-2 5-2 5s3.5-.5 5-2M9 15l-3-3 1-3a9 9 0 0 1 8-5c1 4-1 7-5 8l-3 1ZM14.5 9.5h0"/>,
  star: (p) => <Ic {...p} fill="currentColor" stroke="none" d="m12 3 2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.8 6.8 19.2l1-5.8L3.5 9.2l5.9-.9L12 3Z"/>,
  globe: (p) => <Ic {...p}><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"/></Ic>,
  scan: (p) => <Ic {...p} d="M4 8V5a1 1 0 0 1 1-1h3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3M7 12h10"/>,
  fingerprint: (p) => <Ic {...p} d="M12 11v3a6 6 0 0 0 1 3M8 9a5 5 0 0 1 8 3v2M5 12a8 8 0 0 1 14-5M9 20a8 8 0 0 1-1-2"/>,
};

window.Icons = Icons;
window.I = Icons;
