import{r as x,j as e,L as W,e as _e}from"./vendor-react-CVHocMAO.js";import{F as N,G as Ie,J as $e,K as X,k as Pe,x as ge,a2 as he,cF as ue,cG as xe,cH as fe,ds as be,_ as Me}from"./index-DXdAv5n3.js";import{i as De}from"./claimRequests-LbP6AkmD.js";import{g as ee}from"./feeRates-DFYxRksI.js";import{O as Fe}from"./OptimizedImage-CFzueLcd.js";import{S as Re,c as Te}from"./utils-m29NAvmr.js";import{a as Ae,g as Oe}from"./listingFeeInput-BVaxVJEf.js";import{g as Be}from"./wishlists-mdsVtVG_.js";import{d as Ee}from"./listings-C5R8R0UD.js";import{B as Ge}from"./badge-check-CabiHZCA.js";import{P as ye,c as We,a as me,L as Ve}from"./guestPricing-DaiRwFJy.js";import{S as J}from"./star-WZhRtBdg.js";import{g as ze}from"./listing-utils-DWgPJQzT.js";function He(t){const[s,a]=x.useState(0),[r,l]=x.useState({}),i=x.useCallback(o=>{const n=t.length;if(n===0)return;const f=(o%n+n)%n;a(f)},[t.length]),c=x.useCallback(o=>{l(n=>n[o]?n:{...n,[o]:!0})},[]);return{activeIndex:s,setActiveIndex:a,goToIndex:i,loadedImages:r,markLoaded:c,hasMultipleImages:t.length>1}}const Ke=({count:t,activeIndex:s,onSelect:a})=>{const r=t>5?(()=>{let o=0;return s<=2?o=0:s>=t-2?o=t-5:o=s-2,`translateX(${-o*14}px)`})():"translateX(0)";return e.jsx("div",{className:"absolute inset-x-0 bottom-2.5 z-20 flex items-center justify-center overflow-hidden",children:e.jsx("div",{className:"relative w-[68px] h-2 flex items-center justify-start overflow-hidden",children:e.jsx("div",{className:"flex items-center gap-1.5 transition-transform duration-300 ease-out",style:{transform:r},children:Array.from({length:t}).map((l,i)=>e.jsx("button",{type:"button","aria-label":`Go to photo ${i+1} of ${t}`,onClick:c=>{c.preventDefault(),c.stopPropagation(),a(i)},className:N("h-2 w-2 rounded-full border border-white/60 transition flex-shrink-0",i===s?"bg-white shadow":"bg-white/40 hover:bg-white/70")},i))})})})},je=({images:t,alt:s,emptyState:a,showGradientOverlay:r=!1,alwaysShowControls:l=!1,topLeft:i,topRight:c})=>{const{activeIndex:o,setActiveIndex:n,goToIndex:f,loadedImages:g,markLoaded:d,hasMultipleImages:b}=He(t),u=N("absolute top-1/2 z-20 grid h-7 w-7 -translate-y-1/2 place-items-center rounded-full bg-white/85 text-gray-900 shadow-sm backdrop-blur transition hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black",l?"opacity-100":"opacity-0 group-hover:opacity-100");return e.jsxs(e.Fragment,{children:[t.length>0?e.jsxs(e.Fragment,{children:[t.map((y,v)=>e.jsx(Fe,{src:y,alt:s,variant:"medium",className:N("absolute inset-0 h-full w-full object-cover rounded-t-2xl transition-opacity duration-500",v===o&&g[v]?"opacity-100":"opacity-0"),loading:v===0?"eager":"lazy",decoding:"async",onLoad:()=>d(v),onError:()=>d(v)},y+v.toString())),!g[o]&&e.jsx("div",{className:"absolute inset-0",children:e.jsx(Ie,{className:"h-full w-full rounded-none"})})]}):a??null,r&&e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/0 to-black/0 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),i,c,b&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button","aria-label":"View previous photo",onClick:y=>{y.preventDefault(),y.stopPropagation(),f(o-1)},className:N(u,"left-2.5"),children:e.jsx($e,{className:"h-4 w-4"})}),e.jsx("button",{type:"button","aria-label":"View next photo",onClick:y=>{y.preventDefault(),y.stopPropagation(),f(o+1)},className:N(u,"right-2.5"),children:e.jsx(X,{className:"h-4 w-4"})}),e.jsx(Ke,{count:t.length,activeIndex:o,onSelect:n})]})]})},we=({open:t,onOpenChange:s,listingId:a,listingTitle:r,listingImageUrl:l,onAfterChange:i})=>e.jsx(Re,{open:t,onOpenChange:s,listingId:a,listingTitle:r,listingImageUrl:l,onSavedChange:()=>{i(),window.dispatchEvent(new CustomEvent("savedVenuesChanged"))}});function Ue(t){switch(t.toLowerCase()){case"per_person":case"per-person":case"person":case"guest":return{long:"per person",short:"/person"};case"per_person_per_hour":case"person-hour":case"person_hour":return{long:"per person per hour",short:"/person/hr"};case"per_event":case"per-event":case"event":case"flat":return{long:"per event",short:"event"};case"per_day":case"per-day":case"day":return{long:"per day",short:"/day"};case"per_hour":case"per-hour":case"hour":case"hourly":default:return{long:"per hour",short:"/hr"}}}function ve(t){var f;const s=x.useMemo(()=>Ae(t.rawListing??null),[t.rawListing]),a=x.useMemo(()=>t.feeInput??Oe(t.rawListing??null,s),[s,t.feeInput,t.rawListing]),r=(f=t.packages)==null?void 0:f[0],l=typeof t.baseRate=="number"&&Number.isFinite(t.baseRate)&&t.baseRate>0,i=(r==null?void 0:r.minPrice)??(r==null?void 0:r.price_per_person),c=l?t.baseRate:typeof i=="number"&&Number.isFinite(i)&&i>0?ee(i,a):i,o=x.useMemo(()=>{const g=l?t.priceUnit||"per_hour":(r==null?void 0:r.priceType)||t.priceUnit||"per_hour";return Ue(g)},[l,r==null?void 0:r.priceType,t.priceUnit]),n=c!=null?`$${c.toLocaleString()}`:void 0;return{priceAmount:c,priceDisplay:n,unitLabels:o,feeInput:a,primaryPackage:r,hasDisplayBaseRate:l}}function Ne(t){const{listingId:s,redirectTarget:a,isFavoritedOverride:r,onFavoriteClick:l}=t,{user:i}=Pe(),[c,o]=x.useState(!1),[n,f]=x.useState(!1),g=r!==void 0,d=x.useCallback(async()=>{if(g||!s||!i){o(!1);return}try{const u=await Be(s);o(u.length>0)}catch(u){console.warn("Failed to check saved status:",u),o(!1)}},[g,s,i]);x.useEffect(()=>{d()},[d]);const b=x.useCallback(u=>{if(u.preventDefault(),u.stopPropagation(),u.nativeEvent.stopImmediatePropagation(),l){l(u);return}if(s){if(!i){typeof window<"u"&&(sessionStorage.setItem("postAuthRedirect",a),window.dispatchEvent(new CustomEvent("openAuthModal")));return}f(!0)}},[l,s,i,a]);return{isSaved:g?r:c,showWishlistModal:n,setShowWishlistModal:f,handleSaveClick:b,checkSavedStatus:d}}const qe=6;function ke(t,s={}){const{dedupeByContentKey:a=!1,fallback:r}=s,l=new Set,i=new Set,c=[];for(const o of t){const n=o==null?void 0:o.trim();if(n&&!l.has(n)){if(a){const f=Ee(n);if(i.has(f))continue;i.add(f)}l.add(n),c.push(n)}}return c.length===0?r?[r]:[]:c.slice(0,qe)}function Ce(t){var c,o,n;const{stats:s,rawListing:a,preferGoogle:r=!1}=t,l=(s==null?void 0:s.userRatingCount)??(s==null?void 0:s.reviewCount)??null;if(r){const f=(a==null?void 0:a.enableGoogleReviews)&&((o=(c=a==null?void 0:a.googleReviews)==null?void 0:c.reviews)==null?void 0:o.length),g=(n=a==null?void 0:a.googleReviews)==null?void 0:n.avgRating;if(f&&g!=null&&g>0)return{rating:g.toFixed(1),reviewCount:l};const d=(s==null?void 0:s.averageRating)??(s==null?void 0:s.rating);return{rating:d!=null&&d>0?d.toFixed(1):null,reviewCount:l}}const i=(s==null?void 0:s.rating)??(s==null?void 0:s.averageRating);return{rating:i!=null&&i>0?i.toFixed(1):null,reviewCount:l}}function te(t,s){return[t,s].filter(Boolean).join(", ")||void 0}function Le(t){var l,i;if(t.capacityLabel)return t.capacityLabel;const s=c=>typeof c=="number"&&Number.isFinite(c)&&c>0?Math.round(c):void 0,a=s((l=t.capacity)==null?void 0:l.min)??1,r=s((i=t.capacity)==null?void 0:i.max);return r&&r>=a?`${a}–${r} guests`:`${a}+ guests`}function Se(t,s={}){const{typeAllowList:a,plecMetadataFallback:r}=s;let l=[];return t?l=Te(t).filter(i=>!(!i.showOnCard||a&&!a.includes(i.type))):r&&(r.isFeatured&&l.push({type:"plec_featured",label:"Featured",priority:1,category:"plec",showOnCard:!0}),r.partnerSince&&l.push({type:"plec_partner",label:"PLEC Partner",priority:1,category:"plec",showOnCard:!0}),r.isPopular&&l.push({type:"popular",label:"Popular",priority:3,category:"status",showOnCard:!0})),l.sort((i,c)=>i.priority-c.priority),l.slice(0,1)}function se(t){const s=`/${t.kind}/${t.id}`;return t.searchQuery&&t.searchQuery.length>0?`${s}?${t.searchQuery}`:s}const Xe=({venue:t,className:s,searchQuery:a,hideOverlays:r=!1})=>{var A,O,I,D,B;const l=x.useMemo(()=>ke([t.main_image,...t.galleryImages??[]],{fallback:be}),[t.main_image,t.galleryImages]),[i,c]=x.useState(!1),o=t.id||((A=t.rawListing)==null?void 0:A.listingId),{isSaved:n,showWishlistModal:f,setShowWishlistModal:g,handleSaveClick:d,checkSavedStatus:b}=Ne({listingId:o,redirectTarget:`/venue/${o}`}),{priceAmount:u,priceDisplay:y,unitLabels:v,feeInput:L}=ve(t),$=x.useMemo(()=>!t.packages||t.packages.length===0?!1:t.packages.filter(m=>{const F=m.name&&typeof m.name=="string"&&m.name.trim().length>0,q=m.minPrice!==void 0&&m.minPrice>0||m.price_per_person!==void 0&&m.price_per_person>0;return F||q}).length>0,[t.packages]),k=x.useMemo(()=>{if(t.eventStyles&&t.eventStyles.length>0)return t.eventStyles.filter(Boolean).slice(0,2).map(h=>h.replace(/_/g," ")).join(", ")},[t.eventStyles]),V=te(t.city,t.state),P=k||V,Q=Le({capacityLabel:t.capacityLabel,capacity:t.capacity})||P||"1+ guests",Y=se({kind:"venue",id:t.id,searchQuery:a}),{rating:Z}=Ce({stats:t.stats,rawListing:t.rawListing,preferGoogle:!0}),H=h=>h!=null?`$${h.toLocaleString()}`:void 0,M=x.useMemo(()=>{const h=[];u!=null&&y&&h.push({label:"Base rate",value:`${y} ${v.long}`});const m=t.pricingDetails;if(m!=null&&m.minimumHours&&m.minimumHours>0){const F=m.minimumHours;h.push({label:"Minimum booking",value:`${F} hour${F===1?"":"s"}`})}return(m==null?void 0:m.cleaningFee)!=null&&h.push({label:"Cleaning fee",value:H(ee(m.cleaningFee,L))??"—"}),(m==null?void 0:m.overtimeRate)!=null&&m.overtimeRate>0&&h.push({label:"Overtime rate (if applicable)",value:H(ee(m.overtimeRate,L))??"—"}),h},[L,u,y,v.long,t.pricingDetails]),K=(O=t.pricingDetails)==null?void 0:O.pricingNotes,U=x.useMemo(()=>Se(t.rawListing??null,{typeAllowList:["popular","plec_partner","plec_featured","verified"],plecMetadataFallback:t.plecMetadata}),[t.rawListing,t.plecMetadata]),T=typeof t.verified=="boolean"?t.verified:t.rawListing?De(t.rawListing):!1,_=ge();return e.jsxs(W,{to:Y,target:_?void 0:"_blank",rel:_?void 0:"noopener noreferrer",className:N("group flex flex-col rounded-2xl border-2 border-gray-200 bg-white transition-all duration-200 hover:border-gray-300",s),children:[e.jsx("div",{className:"relative aspect-[5/4] w-full overflow-hidden rounded-t-2xl bg-gradient-to-br from-gray-100 to-gray-200 isolate",children:e.jsx(je,{images:l,alt:t.name,topLeft:e.jsx("div",{className:"absolute left-3 top-3 z-10 flex items-start gap-1.5",children:!r&&t.venue_type&&e.jsx("span",{className:"rounded-full bg-white/90 px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-gray-800 shadow-sm",children:t.venue_type.replace(/_/g," ")})}),topRight:!r&&(!t.rawListing||((I=t.rawListing)==null?void 0:I.status)==="published")?e.jsx("button",{type:"button",onClick:d,className:N("absolute right-3 top-3 z-20 flex h-9 w-9 items-center justify-center rounded-full bg-white/90 shadow-lg backdrop-blur-sm transition-all hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",n?"text-brand hover:bg-brand/10":"text-gray-700 hover:bg-brand hover:text-white"),"aria-label":n?"Remove from favorites":"Save to favorites",children:e.jsx(he,{className:N("h-4 w-4",n&&"fill-current")})}):void 0})}),e.jsxs("div",{className:"flex flex-1 flex-col gap-0.5 pt-2 px-3 pb-3 bg-white rounded-b-2xl",children:[e.jsxs("h3",{className:"flex items-center gap-1 text-sm font-medium leading-tight text-gray-900 min-w-0",children:[e.jsx("span",{className:"line-clamp-1 min-w-0",children:(D=t.highlights)!=null&&D.title?e.jsx("span",{dangerouslySetInnerHTML:{__html:t.highlights.title}}):t.name}),T&&e.jsx(Ge,{className:"h-3.5 w-3.5 flex-shrink-0 text-blue-500","aria-label":"Verified"}),U.length>0&&e.jsx("span",{className:"inline-flex flex-shrink-0 items-center rounded-md bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium leading-none text-amber-700",children:"Featured"})]}),t.tagline?e.jsx("p",{className:"line-clamp-1 text-[10px] leading-tight text-gray-600",children:(B=t.highlights)!=null&&B.tagline?e.jsx("span",{dangerouslySetInnerHTML:{__html:t.highlights.tagline}}):t.tagline}):P?e.jsx("p",{className:"line-clamp-1 text-[10px] leading-tight text-gray-600",children:P}):null,e.jsxs("div",{className:"flex items-center gap-3 text-[10px] font-medium leading-tight text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-0 min-w-0",children:[e.jsx("div",{className:"flex items-center shrink-0",children:y?e.jsxs(ue,{open:i,onOpenChange:c,children:[e.jsx(xe,{asChild:!0,children:e.jsxs("button",{type:"button",onClick:h=>{h.preventDefault(),c(m=>!m)},className:"group/price flex items-center gap-0.5 group-hover:gap-1 transition-all duration-200 rounded-md px-1 py-0.5 -ml-1.5 group-hover:bg-brand/5 hover:bg-brand/10 hover:scale-[1.04] active:scale-100 text-[10px]",children:[$&&e.jsx(ye,{className:"h-3 w-3 text-gray-500 group-hover:text-brand transition-colors shrink-0"}),e.jsx("span",{className:"font-normal text-gray-500 group-hover:text-brand transition-colors",children:"from "}),e.jsx("span",{className:"font-semibold text-gray-900 underline decoration-1 underline-offset-2 group-hover:text-brand transition-colors",children:y}),e.jsx("span",{className:"text-gray-600 whitespace-nowrap group-hover:text-brand transition-colors",children:v.short||v.long}),e.jsx(X,{className:"h-3 w-3 text-gray-400 opacity-0 group-hover:opacity-100 group-hover:text-brand transition-all duration-200 shrink-0 translate-x-[-2px] group-hover:translate-x-0"})]})}),e.jsx(fe,{align:"start",side:"top",sideOffset:10,className:"w-56 rounded-xl border border-border/60 shadow-lg p-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:slide-in-from-bottom-2 data-[state=closed]:slide-out-to-bottom-2",children:e.jsxs("div",{className:"space-y-2.5 text-[13px]",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Price breakdown"}),K?e.jsx("p",{className:"mt-1 text-[11px] text-muted-foreground line-clamp-3 min-w-0 break-words overflow-hidden",children:K}):null]}),e.jsxs("div",{className:"space-y-1.5",children:[M.map(h=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-muted-foreground text-[11px]",children:h.label}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:h.value})]},h.label)),M.length===0?e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Host has not listed additional fees for this venue."}):null]}),$&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"border-t border-gray-200 pt-2.5 mt-2.5",children:e.jsxs(W,{to:a&&a.length>0?`/venue/${t.id}?${a}`:`/venue/${t.id}`,target:_?void 0:"_blank",rel:_?void 0:"noopener noreferrer",className:"flex items-center justify-between gap-2 text-[11px] font-medium text-brand hover:text-brand-600 transition-colors group/link",onClick:h=>{h.stopPropagation(),c(!1)},children:[e.jsx("span",{children:"View packages available"}),e.jsx(X,{className:"h-3 w-3 transform group-hover/link:translate-x-0.5 transition-transform"})]})})})]})})]}):e.jsx("span",{className:"font-semibold text-gray-900",children:"Price on request"})}),e.jsx("span",{className:"min-w-0 truncate -ml-1.75 pointer-events-none",children:Q})]}),e.jsxs("span",{className:"flex items-center gap-0.5 text-gray-600 shrink-0",children:[e.jsx(J,{className:"h-2.5 w-2.5 text-gray-400"}),e.jsx("span",{className:"text-[10px]",children:Z??"New"})]})]})]}),e.jsx(we,{open:f,onOpenChange:g,listingId:o??"",listingTitle:t.name,listingImageUrl:l[0],onAfterChange:b})]})},Je=({service:t,className:s,searchQuery:a,hideOverlays:r=!1,isPreview:l=!1,disableNavigation:i=!1,alwaysShowCarouselControls:c=!1})=>{var re,ie,ne,oe,le;const o=ze(t),n=o??{},f=n.serviceType,g=Me.find(p=>p.id===f),d=n.serviceData??{},b=x.useMemo(()=>d.offerings??[],[d.offerings]),u=b[0],y=x.useMemo(()=>We(t,o??null),[o,t]),[v,L]=x.useState(!1),$=x.useMemo(()=>!b||b.length===0?!1:b.filter(j=>{const w=j.name&&typeof j.name=="string"&&j.name.trim().length>0,C=j.price!==void 0&&j.price>0;return w||C}).length>0,[b]),k=x.useMemo(()=>{var j,w,C;const p=[d.coverImage,(j=n.media)==null?void 0:j.coverImage,...((C=(w=n.media)==null?void 0:w.gallery)==null?void 0:C.filter(S=>S.type==="photo"&&S.url).map(S=>S.url))??[],...(b==null?void 0:b.map(S=>S.image))??[]];return ke(p,{dedupeByContentKey:!0})},[d.coverImage,(re=n.media)==null?void 0:re.coverImage,(ie=n.media)==null?void 0:ie.gallery,b]),V=ge(),P=t.listingId,{isSaved:z,showWishlistModal:Q,setShowWishlistModal:Y,handleSaveClick:Z,checkSavedStatus:H}=Ne({listingId:P,redirectTarget:`/service/${P}`}),M=d.cardTitle,K=(ne=d==null?void 0:d.businessInfo)==null?void 0:ne.businessName,U=M!=null&&M.trim()!=="",T=U?M:l?"Enter listing title":K||(u==null?void 0:u.name)||`${(g==null?void 0:g.label)||"Service"}${(oe=n.location)!=null&&oe.city?` in ${n.location.city}`:""}`,_=f==="chartered_bus"?t.fromPricePerMile:void 0,A=typeof _=="number"&&_>0,O=u?me(u,y):void 0,I=u==null?void 0:u.priceType,D=A?`$${_}/mile`:O?`$${O}${I==="per_person"||I==="per_guest"?" / person":I==="per_group_with_hours"?" / group":I==="per_hour"?" / hour":I==="fixed"?" / event":""}`:"Price on request",B=x.useMemo(()=>{var p,j,w,C;return(p=d.tagline)!=null&&p.trim()?d.tagline.trim():(j=d.cardDescription)!=null&&j.trim()?d.cardDescription.trim():(C=(w=n.basics)==null?void 0:w.tagline)!=null&&C.trim()?n.basics.tagline.trim():null},[d.tagline,d.cardDescription,(le=n.basics)==null?void 0:le.tagline]),h=n.location,m=te(h==null?void 0:h.city,h==null?void 0:h.state)??t.locationLabel??"",F=x.useMemo(()=>Se(t),[t]),q=N("group relative flex flex-col overflow-hidden rounded-2xl border-2 border-gray-200 bg-white transition-all duration-200 hover:border-gray-300",s),ae=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"relative aspect-[5/4] w-full overflow-hidden rounded-t-2xl bg-gradient-to-br from-gray-100 to-gray-200 isolate",children:e.jsx(je,{images:k,alt:T,showGradientOverlay:!0,alwaysShowControls:c,emptyState:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-6xl",children:(g==null?void 0:g.icon)||"✨"}),topLeft:F.length>0?e.jsx("div",{className:"absolute left-3 top-3 z-10",children:e.jsx(Ve,{badges:F,maxDisplay:1,className:"text-[9px]"})}):null,topRight:!r&&(t==null?void 0:t.status)==="published"?e.jsx("button",{type:"button",onClick:Z,className:N("absolute right-3 top-3 z-20 flex h-9 w-9 items-center justify-center rounded-full bg-white/90 shadow-lg backdrop-blur-sm transition-all hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",z?"text-brand hover:bg-brand/10":"text-gray-700 hover:bg-brand hover:text-white"),"aria-label":z?"Remove from favorites":"Save to favorites",children:e.jsx(he,{className:N("h-4 w-4",z&&"fill-current")})}):null})}),e.jsxs("div",{className:"flex flex-col gap-0.5 pt-2 px-3 pb-3 bg-white rounded-b-2xl",children:[e.jsx("h3",{className:N("line-clamp-1 text-sm font-medium pr-1 transition-colors leading-tight",l&&!U?"text-muted-foreground italic":"text-gray-900"),children:T}),B?e.jsx("p",{className:"line-clamp-1 text-[10px] text-gray-600 leading-tight",children:B}):m?e.jsx("p",{className:"line-clamp-1 text-[10px] text-gray-600 leading-tight",children:m}):null,e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-gray-600 leading-tight",children:[$&&!A?e.jsxs(ue,{open:v,onOpenChange:L,children:[e.jsx(xe,{asChild:!0,children:e.jsxs("button",{type:"button",onClick:p=>{p.preventDefault(),p.stopPropagation(),L(!0)},className:"group/price flex items-center gap-1 group-hover:gap-1.5 hover:gap-2 transition-all duration-200 rounded-md px-1.5 py-0.5 -ml-1.5 group-hover:bg-brand/5 hover:bg-brand/10 hover:scale-110 active:scale-100",children:[e.jsx(ye,{className:"h-3 w-3 text-gray-500 group-hover:text-brand transition-colors shrink-0"}),e.jsx("span",{className:"font-normal text-gray-500 group-hover:text-brand transition-colors",children:"from "}),e.jsx("span",{className:"font-semibold text-gray-900 underline decoration-1 underline-offset-2 group-hover:text-brand transition-colors",children:D}),e.jsx(X,{className:"h-3 w-3 text-gray-400 opacity-0 group-hover:opacity-100 group-hover:text-brand transition-all duration-200 transform group-hover:translate-x-0 translate-x-[-4px] shrink-0"})]})}),e.jsx(fe,{align:"start",side:"top",sideOffset:10,className:"w-64 rounded-xl border border-border/60 shadow-lg p-4 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",children:e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Available Offerings"}),e.jsx("div",{className:"space-y-2.5",children:b.filter(p=>{const j=p.name&&typeof p.name=="string"&&p.name.trim().length>0,w=p.price!==void 0&&p.price>0;return j||w}).map(p=>{var de,pe;const j=me(p,y);let w;p.priceType==="per_event"||p.priceType==="fixed"?w="per event":p.priceType==="per_guest"||p.priceType==="per_person"?w="per person":p.priceType==="per_group_with_hours"?w="per group":p.priceType==="per_hour"?w="per hour":w="";let C;j!==void 0&&j>0?C=`$${j.toLocaleString()}${w?` ${w}`:""}`:C="Price on request";const S=p.name,ce=p.description,E=(de=p.guestLimit)==null?void 0:de.min,G=(pe=p.guestLimit)==null?void 0:pe.max,R=p.duration;return e.jsxs("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-3",children:[S&&e.jsx("h4",{className:"text-[13px] font-semibold text-gray-900 mb-1",children:S}),e.jsx("div",{className:"flex items-center justify-between gap-2",children:e.jsx("span",{className:"text-[13px] font-medium text-gray-900",children:C})}),ce&&e.jsx("p",{className:"mt-1.5 text-[11px] text-muted-foreground line-clamp-2",children:ce}),(E||G)&&e.jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:E&&G?`${E}-${G} guests`:E?`${E}+ guests`:G?`Up to ${G} guests`:""}),R&&(R.hours>0||R.minutes>0)&&e.jsxs("p",{className:"mt-1 text-[10px] text-muted-foreground",children:[R.hours>0&&`${R.hours}h `,R.minutes>0&&`${R.minutes}m`]})]},p.id)})})]})})]}):D?e.jsxs("span",{className:"flex items-center gap-0",children:[e.jsx("span",{className:"font-normal text-gray-500",children:"from "}),e.jsx("span",{className:"font-semibold text-gray-900 underline decoration-1 underline-offset-2",children:D})]}):e.jsx("span",{className:"font-semibold text-gray-900",children:"Price on request"}),D&&e.jsx("span",{className:"text-gray-400",children:"·"}),e.jsxs("span",{className:"flex items-center gap-0.5 text-gray-600 shrink-0 ml-auto",children:[e.jsx(J,{className:"h-2.5 w-2.5 text-gray-400"}),e.jsx("span",{className:"text-[10px]",children:"New"})]})]})]}),e.jsx(we,{open:Q,onOpenChange:Y,listingId:P??"",listingTitle:T,listingImageUrl:k[0],onAfterChange:H})]});return i?e.jsx("div",{className:q,children:ae}):e.jsx(W,{to:se({kind:"service",id:t.listingId,searchQuery:a}),target:V?void 0:"_blank",rel:V?void 0:"noopener noreferrer",className:q,children:ae})},Qe=be,Ye=({venue:t,searchQuery:s,className:a,variant:r="default"})=>{var v,L,$;const l=_e(),i=t.main_image||((v=t.galleryImages)==null?void 0:v[0])||Qe,{rating:c,reviewCount:o}=Ce({stats:t.stats}),{priceAmount:n,unitLabels:f}=ve(t),g=n!=null?`$${n.toLocaleString()}${f.short}`:void 0,d=t.capacityLabel||(L=t.capacity)!=null&&L.min?Le({capacityLabel:t.capacityLabel,capacity:t.capacity}):void 0,b=te(t.city,t.state)??"",u=(t.listingKind||(($=t.rawListing)==null?void 0:$.listingKind))==="service"?"service":"venue",y=se({kind:u,id:t.id,searchQuery:s});return r==="compact"?e.jsxs(W,{to:y,className:N("flex h-[104px] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm transition-shadow hover:shadow-md",a),onClick:k=>k.stopPropagation(),children:[e.jsxs("div",{className:"relative h-full w-[88px] shrink-0 overflow-hidden bg-gray-100",children:[e.jsx("img",{src:i,alt:t.name,className:"h-full w-full object-cover",loading:"lazy",decoding:"async"}),t.venue_type&&e.jsx("span",{className:"absolute left-1.5 top-1.5 max-w-[calc(100%-0.75rem)] truncate rounded-full bg-white/90 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-gray-800 shadow-sm",children:t.venue_type.replace(/_/g," ")})]}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-between p-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("h3",{className:"truncate text-sm font-semibold leading-tight text-gray-900",children:t.name}),e.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-xs text-gray-600",children:[g&&e.jsxs("span",{className:"shrink-0 whitespace-nowrap text-gray-700",children:[e.jsx("span",{className:"font-normal text-gray-500",children:"from "}),e.jsx("span",{className:"font-bold text-gray-900",children:g})]}),d&&e.jsx("span",{className:"shrink-0",children:d}),b&&e.jsx("span",{className:"truncate",children:b})]}),t.location&&e.jsx("p",{className:"truncate text-xs text-gray-500",children:t.location})]}),c&&e.jsxs("div",{className:"flex items-center gap-1 text-xs font-medium text-gray-700",children:[e.jsx(J,{className:"h-3 w-3 fill-yellow-400 text-yellow-400"}),e.jsx("span",{children:c}),o!=null&&o>0&&e.jsxs("span",{className:"text-[10px] text-gray-500",children:["(",o,")"]})]})]})]}):e.jsxs(W,{to:y,className:N("block bg-white rounded-lg overflow-hidden shadow-lg border border-gray-200 hover:shadow-xl transition-shadow",a),onClick:k=>k.stopPropagation(),children:[e.jsxs("div",{className:"relative aspect-[16/10] w-full overflow-hidden",children:[e.jsx("img",{src:i,alt:t.name,className:"w-full h-full object-cover"}),t.venue_type&&e.jsx("span",{className:"absolute left-2 top-2 rounded-full bg-white/90 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-gray-800 shadow-sm",children:t.venue_type.replace(/_/g," ")})]}),e.jsxs("div",{className:"p-3 space-y-1.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-sm text-gray-900 line-clamp-1 flex-1",children:t.name}),g&&e.jsxs("span",{className:"text-sm whitespace-nowrap",children:[e.jsx("span",{className:"font-normal text-gray-500",children:"from "}),e.jsx("span",{className:"font-bold text-gray-900",children:g})]})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-600",children:[d&&e.jsx("span",{className:"line-clamp-1",children:d}),b&&e.jsx("span",{className:"line-clamp-1",children:b})]}),t.location&&e.jsx("p",{className:"text-xs text-gray-500 line-clamp-1",children:t.location}),c&&e.jsxs("button",{type:"button",className:"flex items-center gap-1 pt-1 cursor-pointer hover:opacity-80",onClick:k=>{k.preventDefault(),k.stopPropagation(),l(`${y}#reviews`,{state:{scrollToReviews:Date.now()}})},"aria-label":`View reviews for ${t.name}`,children:[e.jsx(J,{className:"w-3 h-3 fill-yellow-400 text-yellow-400"}),e.jsx("span",{className:"text-xs font-medium text-gray-700",children:c}),o!=null&&o>0&&e.jsxs("span",{className:"text-[10px]",children:["(",o,")"]})]})]})]})},mt=t=>{switch(t.kind){case"service":{const{kind:s,...a}=t;return e.jsx(Je,{...a})}case"map":{const{kind:s,...a}=t;return e.jsx(Ye,{...a})}case"venue":default:{const{kind:s,...a}=t;return e.jsx(Xe,{...a})}}};export{mt as L};