module.exports=[626481,a=>{"use strict";var b=a.i(401122);function c(a={}){let{threshold:d=.1,rootMargin:e="0px",triggerOnce:f=!0}=a,[g,h]=(0,b.useState)(!1),i=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let a=new IntersectionObserver(([b])=>{b.isIntersecting?(h(!0),f&&i.current&&a.unobserve(i.current)):f||h(!1)},{threshold:d,rootMargin:e}),b=i.current;return b&&a.observe(b),()=>{b&&a.unobserve(b)}},[d,e,f]),{ref:i,isVisible:g}}a.s(["useScrollAnimation",()=>c])},258626,a=>{"use strict";var b=a.i(676758),c=a.i(830964),d=a.i(793058),e=a.i(986665),f=a.i(663975),g=a.i(401122),h=a.i(626481),i=a.i(902622);let j=(a,b)=>a?"string"==typeof a?a:"object"==typeof a&&(a[b]||a.en||a.fr||Object.values(a)[0])||"":"";function k(){let a=(0,f.useTranslations)(),k=(0,i.useParams)().locale||"fr",[l,m]=(0,g.useState)([]),[n,o]=(0,g.useState)(!0),[p,q]=(0,g.useState)(null),[r,s]=(0,g.useState)(!0),{ref:t,isVisible:u}=(0,h.useScrollAnimation)();return(0,g.useEffect)(()=>{(async()=>{try{o(!0);let a=await fetch("/api/excursions?section=agadir");if(!a.ok)throw Error("Failed to fetch excursions");let b=(await a.json()).data||[],c=await fetch("/api/excursion-settings");if(c.ok){let a=(await c.json()).find(a=>"agadir"===a.section);a&&s(a.showPrice)}let d=b.map(a=>{let b=a.images?.[0]||a.image||"";return{id:a.id,name:j(a.name,k),image:b&&"test"!==b&&""!==b.trim()&&(b.startsWith("http://")||b.startsWith("https://")||b.startsWith("/"))?b:"https://images.unsplash.com/photo-1539635278303-d4002c07eae3?w=800&q=80",priceMAD:a.priceMAD,location:j(a.location,k),productId:a.id,productSlug:a.id,availableDays:a.availableDays}});m(d)}catch(a){console.error("Error fetching data:",a),q(a instanceof Error?a.message:"An error occurred")}finally{o(!1)}})()},[k]),(0,b.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,b.jsx)("div",{className:"fixed top-0 left-0 right-0 h-32 bg-gradient-to-b from-black via-black/80 to-transparent z-40 pointer-events-none"}),(0,b.jsx)(c.default,{}),(0,b.jsxs)("main",{className:"pt-24",children:[(0,b.jsxs)("section",{className:"relative min-h-screen flex items-center justify-center w-full overflow-hidden",children:[(0,b.jsx)("div",{className:"absolute inset-0",children:(0,b.jsx)(d.default,{src:"https://slelguoygbfzlpylpxfs.supabase.co/storage/v1/object/public/project-uploads/9954d743-8735-4b3b-868c-4bb1cfd3cbf8/generated_images/beautiful-agadir-beach-coastline-morocco-08392506-20251124020921.jpg",alt:a("agadirPage.hero.title"),fill:!0,className:"object-cover",priority:!0})}),(0,b.jsx)("div",{className:"absolute inset-0 bg-black/75 z-10"}),(0,b.jsx)("div",{className:"relative z-20 text-center text-white px-4 max-w-5xl mx-auto",children:(0,b.jsxs)("div",{className:"p-8 md:p-12 lg:p-16 animate-scaleIn",style:{background:"linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02))",backdropFilter:"blur(8px) saturate(110%)",WebkitBackdropFilter:"blur(8px) saturate(110%)",border:"1px solid rgba(255, 255, 255, 0.08)",boxShadow:"0 4px 12px rgba(2, 8, 23, 0.4), 0 0 20px rgba(0, 0, 0, 0.02) inset"},children:[(0,b.jsx)("h1",{className:"font-display text-[36px] md:text-[56px] lg:text-[64px] leading-tight font-bold mb-6 text-white",style:{fontFamily:"var(--font-display)"},children:a("agadirPage.hero.title")}),(0,b.jsx)("p",{className:"font-secondary italic text-white text-lg md:text-xl lg:text-2xl font-normal",children:a("agadirPage.hero.description")})]})})]}),(0,b.jsx)("section",{ref:t,className:"py-16 md:py-24 px-4 bg-gray-50",children:(0,b.jsx)("div",{className:"max-w-7xl mx-auto",children:n?(0,b.jsxs)("div",{className:`text-center py-12 scroll-fade ${u?"visible":""}`,children:[(0,b.jsx)("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary"}),(0,b.jsx)("p",{className:"mt-4 text-muted",children:a("common.loading")})]}):p?(0,b.jsx)("div",{className:`text-center py-12 scroll-fade ${u?"visible":""}`,children:(0,b.jsx)("p",{className:"text-red-500",children:p})}):0===l.length?(0,b.jsx)("div",{className:`text-center py-12 scroll-fade ${u?"visible":""}`,children:(0,b.jsx)("p",{className:"text-muted",children:a("excursions.noResults")})}):(0,b.jsx)("div",{className:`scroll-fade ${u?"visible":""}`,children:(0,b.jsx)(e.ActivityGridWithCalendar,{activities:l,categoryName:"Agadir",showPrice:r})})})})]})]})}a.s(["default",()=>k])}];

//# sourceMappingURL=Desktop_Aynnaka_DiffaTours-main%202_src_52cf5322._.js.map