PageSourceSearch

https://brokenbow.ai/assets/ShowcaseDetail-DeDkXRzQ.js

js brokenbow.ai collected 2026-10-05 12:12:37 UTC 12,074 bytes, 7 lines download raw bytes

1import{a3 as ee,a as se,r as w,b as ae,j as e,t as B,F as E,B as l,o as h,H as te,X as ie,d as ne,w as re,$ as R,a2 as le,s as L}from"./index-PtGACUVf.js";import{S as o}from"./skeleton-DaIvcz7V.js";import{B as ce,a as oe,b as v,c as q,d as T,e as me}from"./breadcrumb-Dzkj41pV.js";import{D as de,d as he,a as pe}from"./dialog-1knjOMG6.js";import{C as xe}from"./chevron-left-CXyk187g.js";import{B as ge}from"./bed-CBE_cWO1.js";import{B as ue}from"./bath-BiuPki1m.js";import{R as je}from"./ruler-CCM3lcOa.js";import{B as be}from"./building-BQc-q-zq.js";import{E as fe}from"./external-link-ByXnn-Nj.js";import"./index-DU2LHGu_.js";const Ne={property:"Property",room:"Room",suite:"Suite",cabin:"Cabin",villa:"Villa",condo:"Condo",meeting_space:"Meeting Space",wedding_venue:"Wedding Venue",event_space:"Event Space",banquet_hall:"Banquet Hall",private_dining:"Private Dining",spa_wellness:"Spa/Wellness",tour:"Tour",experience:"Experience",package:"Package"},we=["property","room","suite","cabin","villa","condo"],ve=["meeting_space","wedding_venue","event_space","banquet_hall","private_dining"];function Oe(){var H;const{category:n,slug:c,showcaseSlug:b}=ee(),{city:a}=se(),[y,p]=w.useState(0),[D,x]=w.useState(!1),[_,V]=w.useState(!1),[k,W]=w.useState(!1),{data:A,isLoading:U,error:Y}=ae({queryKey:["showcase-detail",c,b],queryFn:async()=>{const{data:t,error:d}=await L.from("business_showcase").select(`
2          *,
3          business:businesses!inner(
4            id, name, slug, category, categories, primary_category, city_id,
5            cities(name, domain)
6          )
7        `).eq("slug",b).eq("is_active",!0);if(d)throw new Error("Error fetching showcase");const $=t==null?void 0:t.find(u=>{const j=u.business;return(j==null?void 0:j.slug)===c});if(!$){const{data:u,error:j}=await L.from("businesses").select("id, name, slug, category, categories, primary_category, city_id, cities(name, domain)").eq("slug",c).limit(1).maybeSingle();if(j||!u)throw new Error("Business not found");const{data:z,error:Z}=await L.from("business_showcase").select("*").eq("business_id",u.id).eq("slug",b).eq("is_active",!0).maybeSingle();if(Z||!z)throw new Error("Showcase item not found");return{business:u,showcase:z}}const K=$.business,{business:_e,...X}=$;return{business:K,showcase:X}}});if(U)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(B,{}),e.jsxs("main",{className:"container py-8",children:[e.jsx(o,{className:"h-8 w-64 mb-6"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-4 mb-8",children:[e.jsx(o,{className:"lg:col-span-3 aspect-[4/3]"}),e.jsx("div",{className:"lg:col-span-2 grid grid-cols-2 gap-2",children:[1,2,3,4].map(t=>e.jsx(o,{className:"aspect-square"},t))})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(o,{className:"h-10 w-3/4"}),e.jsx(o,{className:"h-6 w-1/2"}),e.jsx(o,{className:"h-32 w-full"})]}),e.jsx(o,{className:"h-64"})]})]}),e.jsx(E,{cityName:(a==null?void 0:a.name)||"",citySlug:(a==null?void 0:a.slug)||""})]});if(Y||!A)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(B,{}),e.jsxs("main",{className:"container py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"This showcase item doesn't exist."}),e.jsx(l,{asChild:!0,children:e.jsx(h,{to:"/",children:"Back to Home"})})]}),e.jsx(E,{cityName:(a==null?void 0:a.name)||"",citySlug:(a==null?void 0:a.slug)||""})]});const{business:r,showcase:s}=A,m=r.cities,f=(m==null?void 0:m.domain)||(a==null?void 0:a.domain)||"iamlocalai.com",S=(m==null?void 0:m.name)||(a==null?void 0:a.name)||"",I=r.primary_category||n||"directory",i=[];s.photos&&Array.isArray(s.photos)&&s.photos.length>0?i.push(...s.photos):s.image_url&&i.push(s.image_url);const C=s.showcase_type||"property",O=we.includes(C),G=ve.includes(C),g=s.amenities||[],J=_?g:g.slice(0,12),P=`${s.title} - ${S} Vacation Rental | ${r.name}`,F=((H=s.description)==null?void 0:H.slice(0,160))||`${s.title} by ${r.name} in ${S}. Book your stay today.`,N=`https://${f}/${n}/${c}/${b}`,M={"@context":"https://schema.org","@type":O?"VacationRental":"Product",name:s.title,de
7scription:s.description,image:i[0],url:N,...s.bedrooms&&{numberOfBedrooms:s.bedrooms},...s.bathrooms&&{numberOfBathroomsTotal:s.bathrooms},...s.sleeps&&{occupancy:{"@type":"QuantitativeValue",value:s.sleeps}},...s.amenities&&{amenityFeature:s.amenities.map(t=>({"@type":"LocationFeatureSpecification",name:t}))}},Q={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:`https://${f}`},{"@type":"ListItem",position:2,name:n,item:`https://${f}/${n}`},{"@type":"ListItem",position:3,name:r.name,item:`https://${f}/${n}/${c}`},{"@type":"ListItem",position:4,name:s.title,item:N}]};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsxs(te,{children:[e.jsx("title",{children:P}),e.jsx("meta",{name:"description",content:F}),e.jsx("link",{rel:"canonical",href:N}),e.jsx("meta",{property:"og:title",content:P}),e.jsx("meta",{property:"og:description",content:F}),i[0]&&e.jsx("meta",{property:"og:image",content:i[0]}),e.jsx("meta",{property:"og:url",content:N}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(M)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(Q)})]}),e.jsx(B,{}),e.jsxs("main",{className:"container py-6",children:[e.jsx(ce,{className:"mb-6",children:e.jsxs(oe,{children:[e.jsx(v,{children:e.jsx(q,{asChild:!0,children:e.jsx(h,{to:"/",children:"Home"})})}),e.jsx(T,{}),e.jsx(v,{children:e.jsx(q,{asChild:!0,children:e.jsx(h,{to:`/${n}`,className:"capitalize",children:n==null?void 0:n.replace(/-/g," ")})})}),e.jsx(T,{}),e.jsx(v,{children:e.jsx(q,{asChild:!0,children:e.jsx(h,{to:`/${r.primary_category||n}/${c}`,children:r.name})})}),e.jsx(T,{}),e.jsx(v,{children:e.jsx(me,{children:s.title})})]})}),i.length>0&&e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-2 mb-8 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"lg:col-span-3 aspect-[4/3] relative cursor-pointer group",onClick:()=>{p(0),x(!0)},children:[e.jsx("img",{src:i[0],alt:s.title,className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors"})]}),i.length>1&&e.jsxs("div",{className:"lg:col-span-2 flex flex-col gap-2",children:[e.jsx("div",{className:"grid grid-cols-2 gap-2",children:i.slice(1,5).map((t,d)=>e.jsxs("div",{className:"aspect-square relative cursor-pointer group",onClick:()=>{p(d+1),x(!0)},children:[e.jsx("img",{src:t,alt:`${s.title} ${d+2}`,className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors"}),d===3&&i.length>5&&e.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:e.jsxs("span",{className:"text-white font-semibold",children:["+",i.length-5," more"]})})]},d))}),e.jsxs(de,{open:D,onOpenChange:x,children:[e.jsx(he,{asChild:!0,children:e.jsxs(l,{variant:"outline",size:"sm",className:"w-full",onClick:()=>{p(0),x(!0)},children:["Show all ",i.length," photos"]})}),e.jsx(pe,{className:"max-w-5xl p-0 bg-black",children:e.jsxs("div",{className:"relative h-[80vh]",children:[e.jsx("img",{src:i[y],alt:`${s.title} ${y+1}`,className:"w-full h-full object-contain"}),e.jsx(l,{variant:"ghost",size:"icon",className:"absolute top-4 right-4 text-white hover:bg-white/20",onClick:()=>x(!1),children:e.jsx(ie,{className:"h-6 w-6"})}),i.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"ghost",size:"icon",className:"absolute left-4 top-1/2 -translate-y-1/2 text-white hover:bg-white/20",onClick:()=>p(t=>t===0?i.length-1:t-1),children:e.jsx(xe,{className:"h-8 w-8"})}),e.jsx(l,{variant:"ghost",size:"icon",className:"absolute right-4 top-1/2 -translate-y-1/2 text-white hover:bg-white/20",onClick:()=>p(t=>t===i.length-1?0:t+1),children:e.jsx(ne,{className:"h-8 w-8"})}),e.jsxs("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 text-white bg-black/50 px-3 py-1 rounded-full text-sm",children:[y+1," / ",i.length]})]})]})})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[e.jsxs("div",{children:[e.jsx(re,{variant:"secondary",className:"mb-3",children:Ne[C]||"Listing"}),e.jsx("h1",{className:"text-3xl font-display font-bold text-foreground mb-4",children:s.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-muted-foreground",children:[O&&e.jsxs(e.Fragment,{children:[s.sleeps&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(R,{className:"h-5 w-5"}),s.sleeps," guests"]}),s.bedrooms&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ge,{className:"h-5 w-5"}),s.bedrooms," bedroom",s.bedrooms!==1?"s":""]}),s.bathrooms&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ue,{className:"h-5 w-5"}),s.bathrooms," bathroom",Number(s.bathrooms)!==1?"s":""]})]}),G&&e.jsxs(e.Fragment,{children:[s.capacity&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(R,{className:"h-5 w-5"}),"Up to ",s.capacity," guests"]}),s.square_feet&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(je,{className:"h-5 w-5"}
7),s.square_feet.toLocaleString()," sq ft"]})]})]})]}),s.description&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-display font-semibold mb-3",children:"About this space"}),e.jsx("div",{className:`text-muted-foreground whitespace-pre-line ${!k&&"line-clamp-5"}`,children:s.description}),s.description.length>400&&e.jsx(l,{variant:"link",className:"px-0 mt-2",onClick:()=>W(!k),children:k?"Show less":"Read more"})]}),g.length>0&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-display font-semibold mb-4",children:"What this place offers"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:J.map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(le,{className:"h-5 w-5 text-primary"}),e.jsx("span",{children:t})]},t))}),g.length>12&&e.jsx(l,{variant:"outline",className:"mt-4",onClick:()=>V(!_),children:_?"Show less":`Show all ${g.length} amenities`})]}),e.jsxs("div",{className:"border-t pt-8",children:[e.jsxs("h2",{className:"text-xl font-display font-semibold mb-4",children:["Hosted by ",r.name]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(be,{className:"h-8 w-8 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:r.name}),e.jsx(l,{variant:"link",className:"px-0 h-auto",asChild:!0,children:e.jsx(h,{to:`/${I}/${c}`,children:"View full business profile"})})]})]})]})]}),e.jsx("div",{className:"lg:col-span-1",children:e.jsxs("div",{className:"sticky top-24 bg-card border rounded-xl p-6 shadow-lg",children:[(s.price||s.pricing_note)&&e.jsxs("div",{className:"mb-6",children:[s.pricing_note&&e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:s.pricing_note}),s.price&&e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-3xl font-bold",children:s.price}),s.price_suffix&&e.jsx("span",{className:"text-muted-foreground",children:s.price_suffix})]})]}),s.booking_url?e.jsx(l,{className:"w-full",size:"lg",asChild:!0,children:e.jsxs("a",{href:s.booking_url,target:"_blank",rel:"noopener noreferrer",children:[s.cta_text||"Book Now",e.jsx(fe,{className:"h-4 w-4 ml-2"})]})}):e.jsx(l,{className:"w-full",size:"lg",asChild:!0,children:e.jsxs(h,{to:`/${I}/${c}`,children:["Contact ",r.name]})}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-4",children:"I AM LOCAL AI does not charge booking fees"})]})})]})]}),e.jsx(E,{cityName:S,citySlug:(a==null?void 0:a.slug)||""})]})}export{Oe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.