module.exports=[607816,a=>{"use strict";let b=(0,a.i(134032).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",()=>b],607816)},874305,a=>{"use strict";let b=(0,a.i(134032).default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);a.s(["Star",()=>b],874305)},895326,a=>{"use strict";let b=(0,a.i(134032).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);a.s(["AlertCircle",()=>b],895326)},370761,a=>{"use strict";let b=(0,a.i(134032).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",()=>b],370761)},34523,a=>{"use strict";let b=(0,a.i(134032).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Clock",()=>b],34523)},125267,396774,a=>{"use strict";var b=a.i(134032);let c=(0,b.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",()=>c],125267);let d=(0,b.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",()=>d],396774)},370326,a=>{"use strict";var b=a.i(676758),c=a.i(401122),d=a.i(939296),e=a.i(761686),f=a.i(178434),g=a.i(902622);a.s(["WishlistButton",0,({excursionId:a,excursionName:h,className:i="",showLabel:j=!1,variant:k="default"})=>{let{user:l,isLoaded:m}=(0,e.useUser)(),n=(0,g.useRouter)(),o=(0,g.useParams)().locale||"fr",[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)(!0);(0,c.useEffect)(()=>{l?.id&&a?(async()=>{try{let b=await fetch(`/api/wishlists/check?userClerkId=${l.id}&excursionId=${a}`);if(b.ok){let a=await b.json();q(a.inWishlist),s(a.wishlistId)}}catch(a){console.error("Error checking wishlist:",a)}finally{w(!1)}})():w(!1)},[l?.id,a]);let x=async b=>{if(b.preventDefault(),b.stopPropagation(),!m||!l){f.toast.error("fr"===o?"Veuillez vous connecter pour ajouter aux favoris":"Please sign in to add to wishlist"),n.push(`/${o}/sign-in`);return}u(!0);try{if(p&&r)if((await fetch(`/api/wishlists/${r}`,{method:"DELETE"})).ok)q(!1),s(null),f.toast.success("fr"===o?"Retiré de vos favoris":"Removed from wishlist");else throw Error("Failed to remove from wishlist");else{let b=await fetch("/api/wishlists",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userClerkId:l.id,excursionId:a})});if(b.ok){let a=await b.json();q(!0),s(a.id),f.toast.success("fr"===o?`${h||"Excursion"} ajout\xe9 aux favoris`:`${h||"Excursion"} added to wishlist`)}else throw Error("Failed to add to wishlist")}}catch(a){console.error("Error toggling wishlist:",a),f.toast.error("fr"===o?"Une erreur est survenue":"An error occurred")}finally{u(!1)}};return!m||v?(0,b.jsxs)("button",{disabled:!0,className:`inline-flex items-center gap-2 transition-all ${i}`,children:[(0,b.jsx)(d.Heart,{className:"w-5 h-5 text-gray-300 animate-pulse"}),j&&(0,b.jsx)("span",{className:"text-sm",children:"Loading..."})]}):"icon-only"===k?(0,b.jsx)("button",{onClick:x,disabled:t,className:`p-2 rounded-full bg-white/90 hover:bg-white transition-all ${p?"text-red-500":"text-gray-600"} ${t?"opacity-50 cursor-not-allowed":"hover:scale-110"} ${i}`,title:p?"fr"===o?"Retirer des favoris":"Remove from wishlist":"fr"===o?"Ajouter aux favoris":"Add to wishlist",children:(0,b.jsx)(d.Heart,{className:`w-5 h-5 transition-all ${p?"fill-current":""}`})}):(0,b.jsxs)("button",{onClick:x,disabled:t,className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg border transition-all ${p?"bg-red-50 border-red-200 text-red-600 hover:bg-red-100":"bg-white border-gray-300 text-gray-700 hover:bg-gray-50"} ${t?"opacity-50 cursor-not-allowed":"hover:scale-105"} ${i}`,children:[(0,b.jsx)(d.Heart,{className:`w-5 h-5 transition-all ${p?"fill-current":""}`}),j&&(0,b.jsx)("span",{className:"text-sm font-medium",children:t?"fr"===o?"Chargement...":"Loading...":p?"fr"===o?"Dans les favoris":"In Wishlist":"fr"===o?"Ajouter aux favoris":"Add to Wishlist"})]})}])}];

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