// ═══════════════════════════════════════════════════════════════════
// src/icons.jsx — All SVG icons as thin functional components.
// No business logic, no state — pure presentation.
// Adding a new icon: add a key to Icon{} or ServiceIcon cases.
// ═══════════════════════════════════════════════════════════════════

// ── Generic UI icons ─────────────────────────────────────────────────
const Icon = {
  arrow: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"
         width="18" height="18" {...p}>
      <path d="M5 12h14M13 6l6 6-6 6"/>
    </svg>
  ),

  whatsapp: (p) => (
    <svg viewBox="0 0 24 24" fill="currentColor" width="20" height="20" {...p}>
      <path d="M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.93.55 3.81 1.57 5.42L2 22l4.79-1.65a9.9 9.9 0 0 0 5.25 1.5h.01c5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.13-2.9-7s-4.36-2.94-7.02-2.94zm0 18.16h-.01a8.3 8.3 0 0 1-4.22-1.15l-.3-.18-3.13 1.08 1.07-3.07-.2-.32a8.18 8.18 0 0 1-1.26-4.4c0-4.55 3.7-8.24 8.25-8.24a8.2 8.2 0 0 1 8.25 8.25c0 4.55-3.7 8.03-8.45 8.03zm4.65-6.18c-.25-.13-1.5-.74-1.74-.82-.23-.09-.4-.13-.57.13-.17.25-.65.82-.8.99-.15.17-.3.19-.55.06-.25-.13-1.07-.4-2.05-1.27-.76-.68-1.27-1.51-1.42-1.76-.15-.25-.02-.39.11-.51.12-.11.25-.3.38-.44.13-.15.17-.25.25-.42.08-.17.04-.32-.02-.45-.06-.13-.57-1.38-.78-1.88-.21-.5-.42-.43-.57-.44h-.49c-.17 0-.45.06-.68.32-.23.25-.89.87-.89 2.12 0 1.25.91 2.45 1.04 2.62.13.17 1.79 2.73 4.33 3.83.61.26 1.08.42 1.45.54.61.19 1.16.17 1.6.1.49-.07 1.5-.61 1.71-1.21.21-.6.21-1.11.15-1.21-.06-.11-.23-.17-.49-.3z"/>
    </svg>
  ),

  check: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
         width="18" height="18" {...p}>
      <path d="M5 13l4 4L19 7"/>
    </svg>
  ),

  plus: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.8" strokeLinecap="round" width="16" height="16" {...p}>
      <path d="M12 5v14M5 12h14"/>
    </svg>
  ),

  menu: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.6" strokeLinecap="round" {...p}>
      <path d="M4 7h16M4 12h16M4 17h16"/>
    </svg>
  ),

  close: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.6" strokeLinecap="round" {...p}>
      <path d="M6 6l12 12M18 6L6 18"/>
    </svg>
  ),

  pin: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" {...p}>
      <path d="M12 21s-7-7.5-7-12a7 7 0 1 1 14 0c0 4.5-7 12-7 12z"/>
      <circle cx="12" cy="9" r="2.5"/>
    </svg>
  ),

  clock: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.5" strokeLinecap="round" {...p}>
      <circle cx="12" cy="12" r="9"/>
      <path d="M12 7v5l3 2"/>
    </svg>
  ),

  phone: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" {...p}>
      <path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.86 19.86 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.86 19.86 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72a2 2 0 0 1 1.72 2.02z"/>
    </svg>
  ),

  star: (p) => (
    <svg viewBox="0 0 24 24" fill="currentColor" width="14" height="14" {...p}>
      <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
    </svg>
  ),

  sparkle: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" {...p}>
      <path d="M12 3v4M12 17v4M3 12h4M17 12h4M5.5 5.5l2.5 2.5M16 16l2.5 2.5M5.5 18.5L8 16M16 8l2.5-2.5"/>
    </svg>
  ),

  handle: (p) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         strokeWidth="2" strokeLinecap="round"
         width="18" height="18" {...p}>
      <path d="M9 6l-6 6 6 6M15 6l6 6-6 6"/>
    </svg>
  ),
};

// ── Service-specific icons (abstract geometric, 32×32 viewBox) ───────
const ServiceIcon = ({ kind }) => {
  const base = {
    viewBox: "0 0 32 32",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: "1.4",
    strokeLinecap: "round",
    strokeLinejoin: "round",
    width: "28",
    height: "28",
  };

  const shapes = {
    limpeza: (
      <svg {...base}>
        <circle cx="16" cy="16" r="9"/>
        <path d="M16 7v2M16 23v2M7 16h2M23 16h2"/>
        <circle cx="16" cy="16" r="3.5" fill="currentColor" opacity=".15"/>
      </svg>
    ),
    extracao: (
      <svg {...base}>
        <path d="M11 6c-3 0-5 2-5 5 0 2 1 4 1 7 0 2 1 4 3 4s2-3 3-5h6c1 2 1 5 3 5s3-2 3-4c0-3 1-5 1-7 0-3-2-5-5-5"/>
      </svg>
    ),
    aparelho: (
      <svg {...base}>
        <path d="M5 13c2-2 5-3 11-3s9 1 11 3"/>
        <path d="M5 19c2 2 5 3 11 3s9-1 11-3"/>
        <circle cx="10" cy="16" r="1.4" fill="currentColor"/>
        <circle cx="16" cy="16" r="1.4" fill="currentColor"/>
        <circle cx="22" cy="16" r="1.4" fill="currentColor"/>
      </svg>
    ),
    clareamento: (
      <svg {...base}>
        <circle cx="16" cy="16" r="6"/>
        <path d="M16 4v3M16 25v3M4 16h3M25 16h3M7.5 7.5L9.6 9.6M22.4 22.4l2.1 2.1M7.5 24.5L9.6 22.4M22.4 9.6l2.1-2.1"/>
      </svg>
    ),
    implante: (
      <svg {...base}>
        <path d="M10 5h12l-1 6h-2l-1 4h-2l-1 9-1-9h-2l-1-4h-2z"/>
        <path d="M14 5v3M18 5v3"/>
      </svg>
    ),
    estetica: (
      <svg {...base}>
        <path d="M16 4c2 4 6 6 10 6-4 1-7 5-7 10 0-5-4-9-9-10 4-2 6-4 6-6z"/>
        <circle cx="22" cy="22" r="3"/>
      </svg>
    ),
  };

  return shapes[kind] || null;
};
