/* ===== Подари вторую жизнь — icons (functional line icons) ===== */
const Svg = ({ children, fill, sw = 2, ...p }) => (
  <svg viewBox="0 0 24 24" fill={fill || 'none'} stroke="currentColor" strokeWidth={sw}
       strokeLinecap="round" strokeLinejoin="round" {...p}>{children}</svg>
);

const Icons = {
  paw: (p) => (
    <svg viewBox="0 0 24 24" fill="currentColor" {...p}>
      <ellipse cx="6" cy="11" rx="2" ry="2.6"/><ellipse cx="10.2" cy="7.6" rx="2" ry="2.7"/>
      <ellipse cx="14.6" cy="7.6" rx="2" ry="2.7"/><ellipse cx="18.6" cy="11.4" rx="2" ry="2.5"/>
      <path d="M12.3 12.2c2.5 0 4.4 1.7 4.9 3.6.5 2-1 3.6-3 3.6-1 0-1.3-.4-2-.4s-1 .4-2 .4c-2 0-3.5-1.6-3-3.6.5-1.9 2.5-3.6 5-3.6Z"/>
    </svg>
  ),
  pawHeart: (p) => (
    <svg viewBox="0 0 24 24" fill="currentColor" {...p}>
      <ellipse cx="5.8" cy="9.6" rx="1.85" ry="2.45"/><ellipse cx="9.7" cy="6.5" rx="1.85" ry="2.55"/>
      <ellipse cx="14.3" cy="6.5" rx="1.85" ry="2.55"/><ellipse cx="18.2" cy="9.6" rx="1.85" ry="2.45"/>
      <path d="M12 21.6c-3.4-2.3-6.3-4.5-6.3-7.5 0-2.05 1.65-3.45 3.45-3.45 1.2 0 2.15.62 2.85 1.7.7-1.08 1.65-1.7 2.85-1.7 1.8 0 3.45 1.4 3.45 3.45 0 3-2.9 5.2-6.15 7.5Z"/>
    </svg>
  ),
  clock: (p) => (<Svg {...p}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3.5 2"/></Svg>),
  camera: (p) => (<Svg {...p}><path d="M3 8.5A1.5 1.5 0 0 1 4.5 7H6l1.2-1.8A1 1 0 0 1 8 4.8h8a1 1 0 0 1 .8.4L18 7h1.5A1.5 1.5 0 0 1 21 8.5v9A1.5 1.5 0 0 1 19.5 19h-15A1.5 1.5 0 0 1 3 17.5Z"/><circle cx="12" cy="13" r="3.4"/></Svg>),
  tune: (p) => (<Svg {...p}><path d="M4 6h10M18 6h2M4 12h2M10 12h10M4 18h7M15 18h5"/><circle cx="16" cy="6" r="2"/><circle cx="8" cy="12" r="2"/><circle cx="13" cy="18" r="2"/></Svg>),
  search: (p) => (<Svg {...p}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.2-3.2"/></Svg>),
  home: (p) => (<Svg {...p}><path d="M4 11.5 12 4l8 7.5"/><path d="M6 10v9h12v-9"/><path d="M10 19v-5h4v5"/></Svg>),
  grid: (p) => (<Svg {...p}><rect x="4" y="4" width="7" height="7" rx="1.5"/><rect x="13" y="4" width="7" height="7" rx="1.5"/><rect x="4" y="13" width="7" height="7" rx="1.5"/><rect x="13" y="13" width="7" height="7" rx="1.5"/></Svg>),
  arrowRight: (p) => (<Svg {...p}><path d="M5 12h14M13 6l6 6-6 6"/></Svg>),
  arrowLeft: (p) => (<Svg {...p}><path d="M19 12H5M11 6l-6 6 6 6"/></Svg>),
  chevL: (p) => (<Svg {...p}><path d="m15 5-7 7 7 7"/></Svg>),
  chevR: (p) => (<Svg {...p}><path d="m9 5 7 7-7 7"/></Svg>),
  heart: (p) => (<Svg {...p}><path d="M12 20s-7-4.5-9.2-9C1.3 8 2.6 5 5.6 5c2 0 3.2 1.3 4.4 2.8C11.2 6.3 12.4 5 14.4 5c3 0 4.3 3 2.8 6-2.2 4.5-9.2 9-9.2 9Z"/></Svg>),
  pin: (p) => (<Svg {...p}><path d="M12 21s-6-5.3-6-10a6 6 0 1 1 12 0c0 4.7-6 10-6 10Z"/><circle cx="12" cy="11" r="2.3"/></Svg>),
  phone: (p) => (<Svg {...p}><path d="M5 4h3l1.5 4-2 1.2a12 12 0 0 0 5.3 5.3l1.2-2L18 18v3a1 1 0 0 1-1 1A14 14 0 0 1 4 6a1 1 0 0 1 1-1Z"/></Svg>),
  cake: (p) => (<Svg {...p}><path d="M5 21h14M5 21v-7a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v7"/><path d="M3 21h18M12 7v3M12 4v.5"/><path d="M5 16c1.5 0 1.5-1.2 3.5-1.2S10 16 12 16s1.5-1.2 3.5-1.2S17 16 19 16"/></Svg>),
  ruler: (p) => (<Svg {...p}><rect x="3" y="8" width="18" height="8" rx="1.5" transform="rotate(0 12 12)"/><path d="M7 8v3M11 8v4M15 8v3M19 8v4"/></Svg>),
  male: (p) => (<Svg {...p}><circle cx="10" cy="14" r="5"/><path d="M14 10l6-6M15 4h5v5"/></Svg>),
  female: (p) => (<Svg {...p}><circle cx="12" cy="9" r="5"/><path d="M12 14v7M9 18h6"/></Svg>),
  cat: (p) => (<Svg {...p}><path d="M4 9 5 4l3.2 2.6a8 8 0 0 1 7.6 0L19 4l1 5v4a8 8 0 0 1-16 0Z"/><path d="M9 13h.01M15 13h.01M10.5 16.5c.5.5 2.5.5 3 0"/></Svg>),
  dog: (p) => (<Svg {...p}><path d="M10 5 7 4 5 6v4l-1 2v3a5 5 0 0 0 5 5h6a5 5 0 0 0 5-5v-3l-1-2V6l-2-2-3 1"/><path d="M9 13h.01M15 13h.01M11 16h2"/></Svg>),
  upload: (p) => (<Svg {...p}><path d="M12 16V4M8 8l4-4 4 4"/><path d="M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"/></Svg>),
  image: (p) => (<Svg {...p}><rect x="3" y="4" width="18" height="16" rx="2.5"/><circle cx="8.5" cy="9.5" r="1.8"/><path d="m4 17 4.5-4.5 4 4L16 13l4 4"/></Svg>),
  sparkle: (p) => (<Svg {...p}><path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8Z"/><path d="M19 15l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7Z"/></Svg>),
  check: (p) => (<Svg {...p}><path d="m5 12 4.5 4.5L19 7"/></Svg>),
  checkCircle: (p) => (<Svg {...p}><circle cx="12" cy="12" r="9"/><path d="m8.5 12 2.5 2.5 4.5-5"/></Svg>),
  x: (p) => (<Svg {...p}><path d="M6 6l12 12M18 6 6 18"/></Svg>),
  plus: (p) => (<Svg {...p}><path d="M12 5v14M5 12h14"/></Svg>),
  edit: (p) => (<Svg {...p}><path d="M4 20h4L19 9l-4-4L4 16Z"/><path d="m14 6 4 4"/></Svg>),
  trash: (p) => (<Svg {...p}><path d="M4 7h16M9 7V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2M6 7l1 13a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1l1-13"/></Svg>),
  lock: (p) => (<Svg {...p}><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></Svg>),
  menu: (p) => (<Svg {...p}><path d="M4 7h16M4 12h16M4 17h16"/></Svg>),
  info: (p) => (<Svg {...p}><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/></Svg>),
  shield: (p) => (<Svg {...p}><path d="M12 3 5 6v5c0 4.4 3 7.6 7 9 4-1.4 7-4.6 7-9V6Z"/><path d="m9 12 2 2 4-4"/></Svg>),
  heartHand: (p) => (<Svg {...p}><path d="M12 21s-7-4.5-9.2-9C1.3 8 2.6 5 5.6 5c2 0 3.2 1.3 4.4 2.8C11.2 6.3 12.4 5 14.4 5c3 0 4.3 3 2.8 6-2.2 4.5-9.2 9-9.2 9Z"/></Svg>),
  scan: (p) => (<Svg {...p}><path d="M4 8V6a2 2 0 0 1 2-2h2M16 4h2a2 2 0 0 1 2 2v2M20 16v2a2 2 0 0 1-2 2h-2M8 20H6a2 2 0 0 1-2-2v-2"/><path d="M4 12h16"/></Svg>),
  refresh: (p) => (<Svg {...p}><path d="M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4"/><path d="M20 12a8 8 0 0 1-13.7 5.6L4 16M4 20v-4h4"/></Svg>),
  bell: (p) => (<Svg {...p}><path d="M6 9a6 6 0 0 1 12 0c0 5 2 6 2 6H4s2-1 2-6Z"/><path d="M10 19a2 2 0 0 0 4 0"/></Svg>),
};
Object.assign(window, { Icons, Svg });
