/* global React, window */ // Shampooch — shared components. const { useState, useEffect, useRef } = React; const D = window.SHAMPOOCH_DATA; // ----- Routing helpers ----- function useHashRoute() { const [route, setRoute] = useState(() => window.location.hash.replace(/^#/, "") || "/"); useEffect(() => { const onHash = () => { setRoute(window.location.hash.replace(/^#/, "") || "/"); window.scrollTo({ top: 0, behavior: "instant" }); }; window.addEventListener("hashchange", onHash); return () => window.removeEventListener("hashchange", onHash); }, []); return route; } function go(path) { window.location.hash = path; } // Trivial icon set (kept minimal — no decorative SVG) function Icon({ name, size = 18 }) { const common = { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; switch (name) { case "wa": return ( ); case "phone": return ; case "arrow": return ; case "arrow-up": return ; case "check": return ; case "menu": return ; case "close": return ; case "shield": return ; case "sparkle": return ; case "map": return ; case "clock": return ; case "mail": return ; case "star": return ; case "paw": return ; case "ig": return ; case "tiktok": return ; default: return null; } } // ----- Logo mark ----- function LogoMark() { return ( Shampooch ); } // ----- Nav ----- function Nav() { const route = useHashRoute(); const [drawer, setDrawer] = useState(false); useEffect(() => { setDrawer(false); }, [route]); const isActive = (p) => route === p || (p !== "/" && route.startsWith(p)); return (
{ if (el) el.style.display = window.innerWidth >= 960 ? "inline-flex" : "none"; }}> Book on WhatsApp
{drawer && (
Home Services {D.services.map(s => {s.name})} About Reviews FAQ Contact Book on WhatsApp
)}
); } // ----- WA button helper ----- function waLink(text) { return `https://wa.me/${D.contact.waNumber}?text=${encodeURIComponent(text)}`; } // ----- Trust strip (marquee) ----- function TrustStrip() { const items = [ "Family-run · 20+ years caring for Dubai's dogs", "Vaccination-safe — booklet required", "Fluff-dried · no box dryers", "Tick control · Frontline available", "24/7 supervised boarding · staff sleep with the pack", "Advanced air-filtration · cameras · alarms", "Dogs only · 4 months +", ]; return (
); } // ----- Trust chips (inline) ----- function TrustChips({ items }) { return (
{items.map((t, i) => ( {t} ))}
); } // ----- Service tile ----- function ServiceTile({ s, index }) { return ( {`${s.name}
{s.num} · {s.tagline}
{s.badge && {s.badge}}

{s.name}

{s.short}

); } // ----- Big quote block ----- function VerifiedQuote() { const t = D.testimonial; return (
{[0,1,2,3,4].map(i => )} Verified

{t.body}

MG
{t.name}
{t.role}
); } // ----- Footer ----- function Footer() { return ( ); } // ----- Floating WhatsApp + Mobile bar ----- function FloatingCTAs() { return ( <>
Call WhatsApp Book
); } // ----- Page wrapper ----- function PageWrap({ children }) { return ( <>