// Icons — minimal hand-tuned line icons, plus BrandSeal (shoemaker's last)
// Exposed on window for use across babel files.

const Ic = {
  search: (p={}) => <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" {...p}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>,
  user: (p={}) => <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><circle cx="12" cy="8" r="4"/><path d="M4 21c1.5-4.5 5-6 8-6s6.5 1.5 8 6"/></svg>,
  heart: (p={}) => <svg viewBox="0 0 24 24" width="20" height="20" fill={p.fill||"none"} stroke="currentColor" strokeWidth="1.5" {...p}><path d="M12 20.5s-7.5-4.7-7.5-10.3c0-2.6 2-4.7 4.6-4.7 1.6 0 2.7.8 3.4 2 .7-1.2 1.8-2 3.4-2 2.6 0 4.6 2.1 4.6 4.7 0 5.6-7.5 10.3-7.5 10.3Z"/></svg>,
  bag: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="M5.5 8h13l-1 12.5a1 1 0 0 1-1 .9H7.5a1 1 0 0 1-1-.9Z"/><path d="M9 8V6a3 3 0 0 1 6 0v2"/></svg>,
  menu: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" {...p}><path d="M4 7h16M4 12h16M4 17h16"/></svg>,
  close: (p={}) => <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" {...p}><path d="m6 6 12 12M18 6 6 18"/></svg>,
  arrowR: (p={}) => <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" {...p}><path d="M5 12h14m-6-6 6 6-6 6"/></svg>,
  arrowL: (p={}) => <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" {...p}><path d="M19 12H5m6-6-6 6 6 6"/></svg>,
  caret: (p={}) => <svg viewBox="0 0 24 24" width="10" height="10" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="m6 9 6 6 6-6"/></svg>,
  star: (p={}) => <svg viewBox="0 0 24 24" width="14" height="14" fill={p.fill||"currentColor"} {...p}><path d="m12 2 2.9 6.6 7.1.6-5.4 4.7 1.6 7-6.2-3.7-6.2 3.7 1.6-7L2 9.2l7.1-.6Z"/></svg>,
  starOutline: (p={}) => <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="m12 2 2.9 6.6 7.1.6-5.4 4.7 1.6 7-6.2-3.7-6.2 3.7 1.6-7L2 9.2l7.1-.6Z"/></svg>,
  truck: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="M3 7h11v9H3z"/><path d="M14 10h4l3 3v3h-7"/><circle cx="7" cy="18" r="2"/><circle cx="17" cy="18" r="2"/></svg>,
  shield: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="M12 3 4 6v6c0 4.5 3.4 8.4 8 9 4.6-.6 8-4.5 8-9V6Z"/><path d="m9 12 2 2 4-4"/></svg>,
  refresh: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M21 4v4h-4"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/><path d="M3 20v-4h4"/></svg>,
  award: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><circle cx="12" cy="9" r="6"/><path d="m9 14-2 7 5-3 5 3-2-7"/></svg>,
  zoom: (p={}) => <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5M11 8v6M8 11h6"/></svg>,
  check: (p={}) => <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" {...p}><path d="m5 12 5 5L20 7"/></svg>,
  checkBig: (p={}) => <svg viewBox="0 0 24 24" width="36" height="36" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" {...p}><path d="m5 12 5 5L20 7"/></svg>,
  needle: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="m4 20 6-6m0 0 8-8 2 2-8 8m-2-2 2 2"/><circle cx="18" cy="6" r="1.5"/></svg>,
  scissor: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M9 8 21 19M9 16 21 5"/></svg>,
  gem: (p={}) => <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}><path d="M6 3h12l3 6-9 12L3 9Z"/><path d="M3 9h18M9 3l-3 6 6 12 6-12-3-6"/></svg>,
};

// BrandSeal — shoemaker's last (wooden foot form) as a brutalist technical blueprint
function BrandSeal({ size = 42 }) {
  return (
    <svg width={size} height={size} viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
      {/* Shoe-form silhouette — elongated oval foot shape */}
      <ellipse cx="21" cy="22" rx="14" ry="10" stroke="currentColor" strokeWidth="1.2" fill="none" />
      {/* Toe taper — narrower at front */}
      <path d="M33 22 C33 28 27 31 21 31 C15 31 9 28 9 22 C9 16 15 13 21 13 C27 13 33 16 33 22 Z" stroke="currentColor" strokeWidth="1.2" fill="none" />
      {/* Heel block */}
      <rect x="14" y="28" width="14" height="5" rx="2" stroke="currentColor" strokeWidth="1" fill="none" />
      {/* Central vertical axis line (blueprint centerline) */}
      <line x1="21" y1="8" x2="21" y2="36" stroke="currentColor" strokeWidth="0.6" strokeDasharray="3 2" />
      {/* Horizontal cross-line 1 (ball line) */}
      <line x1="10" y1="20" x2="32" y2="20" stroke="currentColor" strokeWidth="0.6" strokeDasharray="2 2" />
      {/* Horizontal cross-line 2 (instep line) */}
      <line x1="12" y1="26" x2="30" y2="26" stroke="currentColor" strokeWidth="0.6" strokeDasharray="2 2" />
      {/* Heel dot */}
      <circle cx="21" cy="30" r="1.5" fill="currentColor" />
    </svg>
  );
}

function CornerOrn({ size = 80, color = '#b18438', ...p }) {
  return (
    <svg width={size} height={size} viewBox="0 0 80 80" fill="none" {...p}>
      <g stroke={color} strokeWidth="0.8" fill="none">
        <path d="M10 10 C 30 10, 40 20, 40 40" />
        <path d="M10 10 C 10 30, 20 40, 40 40" />
        <path d="M14 14 C 28 14, 36 22, 36 36" />
        <circle cx="10" cy="10" r="2" fill={color} />
        <circle cx="40" cy="40" r="2" fill={color} />
        <path d="M16 22 C 22 20, 26 22, 28 28 C 26 30, 22 30, 18 28 Z" fill={color} fillOpacity="0.15" />
        <path d="M22 16 C 26 18, 28 22, 28 28" />
        <path d="M30 14 l 0 6 M14 30 l 6 0" />
      </g>
    </svg>
  );
}

window.Ic = Ic;
window.CornerOrn = CornerOrn;
window.BrandSeal = BrandSeal;
