1import{c as q,gV as I,m as P,r as x,gj as B,bO as G,cl as H,a as T,j as e,L as m,b as d,S as f,M as U,P as V,aX as N,V as _,E as O}from"./index-DPvlhSbR.js";import{i as $,C as W}from"./city-load-error-BKiBxDAj.js";import{M as S}from"./amenity-pages-DpaQhQLV.js";import{B as K}from"./breadcrumbs-DTLw04lH.js";import{F as Q}from"./feature-nearby-results-CcrOorcd.js";import{F as X}from"./faq-section-CeFhW6zY.js";import{A as g}from"./arrow-left-BTh5i4r5.js";import"./refresh-cw-C0ECjCk7.js";import"./builders-BQdscFNn.js";import"./operator-profiles-CoCD50mO.js";import"./venue-map-split-Bz540mbV.js";import"./loader-circle-DThyRmJW.js";import"./circle-alert-PjTXx9VP.js";function le(){const[,p]=q("/cities/:citySlug/:serviceSlug"),l=p?.citySlug||"",w=p?.serviceSlug||"",s=I(w),{data:n,isLoading:y,error:o,refetch:L,isRefetching:C}=P(l,{query:{enabled:!!l&&!!s,queryKey:O(l)}}),a=x.useMemo(()=>s&&n?n.venues.filter(t=>(t.services??[]).includes(s.label)):[],[n,s]),b=x.useMemo(()=>{const t=new Map;for(const i of a)for(const r of i.tech??[])t.set(r,(t.get(r)??0)+1);return[...t.entries()].map(([i,r])=>({name:i,count:r})).sort((i,r)=>r.count-i.count||i.name.localeCompare(r.name))},[a]),h=x.useMemo(()=>{if(!s||!n||a.length===0)return[];const t=a.map(c=>c.pricePerHour).filter(c=>c!=null&&c>0),i=new Set;a.forEach(c=>(c.tech??[]).forEach(R=>i.add(R)));const r=[];r.push({q:`How many venues offer ${s.noun} in ${n.name}, ${n.state}?`,a:`Golf Sim Finder lists ${a.length} ${a.length===1?"venue":"venues"} offering ${s.noun} in ${n.name}, ${n.state}.`});const u=B(t.length?Math.min(...t):null,t.length?Math.max(...t):null);u&&r.push({q:`How much does ${s.label.toLowerCase()} cost in ${n.name}?`,a:`Among ${n.name} venues that publish pricing, hourly bay rates run ${u}. Rates vary by venue and time of day, so check each listing.`});const v=[...i].sort();return v.length>0&&r.push({q:`What simulator technology is available for ${s.label.toLowerCase()} in ${n.name}?`,a:`${n.name} venues offering ${s.noun} run simulator technology including ${G(v)}.`}),r},[s,n,a]),E=s?`${s.label} in ${n?.name||l} | Golf Sim Finder`:"Not Found | Golf Sim Finder",F=s?`Find ${s.noun} in ${n?.name||l}. Compare indoor golf venues offering ${s.noun}, see pricing and hours, and book.`:"",j=!y&&!o&&n,k=x.useMemo(()=>{if(!s||!j||a.length===0)return;const t=[{"@type":"ItemList",name:`${s.label} in ${n.name}, ${n.state}`,numberOfItems:a.length,itemListElement:a.map((r,u)=>({"@type":"ListItem",position:u+1,item:{"@type":"SportsActivityLocation",name:r.name,address:{"@type":"PostalAddress",streetAddress:r.address,addressLocality:r.city,addressRegion:r.state,addressCountry:"US"}}}))}],i=H(h);return i&&t.push(i),{"@context":"https://schema.org","@graph":t}},[s,n,a,h]),A=s?`${typeof window<"u"?window.location.origin:""}/cities/${l}/${s.slug}`:void 0;if(T({title:E,description:F,url:A,jsonLd:k,robots:!s||o&&$(o)?"noindex, follow":j?a.length<S?"noindex, follow":"index, follow":null}),!s)return e.jsx(m,{children:e.jsxs("div",{className:"container mx-auto px-4 py-20 text-center",children:[e.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Service Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"We couldn't find the service you're looking for."}),e.jsxs(d,{href:"/services",className:"inline-flex items-center text-primary font-medium hover:underline",children:[e.jsx(g,{className:"w-4 h-4 mr-2"})," All Services"]})]})});if(y)return e.jsx(m,{children:e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsx(f,{className:"h-8 w-64 mb-4"}),e.jsx(f,{className:"h-6 w-96 max-w-full mb-12"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3].map(t=>e.jsx(f,{className:"aspect-[4/3] rounded-xl"},t))})]})});if(o||!n)return o&&!$(o)?e.jsx(m,{children:e.jsx(W,{error:o,onRetry:()=>L(),isRetrying:C})}):e.jsx(m,{children:e.jsxs("div",{className:"container mx-auto px-4 py-20 text-center",children:[e.jsx("h1",{className:"text-4xl font-bold mb-4",children:"City Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"We couldn't find the city you're looking for."}),e.jsxs(d,{href:"/",className:"inline-flex items-center text-primary font-medium hover:underline",children:[e.jsx(g,{className:"w-4 h-4 mr-2"})," Back to Home"]})]})});const M=s.icon;return e.jsxs(m,{children:[e.jsx("div",{className:"bg-card border-b",children:e.jsxs("div",{className:"container mx-auto px-4 py-16",children:[e.jsx("div",{className:"mb-4",children:e.jsx(K,{items:[{name:"Home",href:"/"},{name:`${n.name}, ${n.state}`,href:`/cities/${n.slug}`},{name:s.label}
1]})}),e.jsxs(d,{href:`/cities/${n.slug}`,className:"inline-flex items-center text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[e.jsx(g,{className:"w-4 h-4 mr-1.5"})," All venues in ",n.name]}),e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0",children:e.jsx(M,{className:"w-7 h-7"})}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight",children:[s.label," in ",n.name,", ",n.state]})]}),e.jsxs("p",{className:"text-lg text-muted-foreground flex items-center gap-2",children:[e.jsx(U,{className:"w-5 h-5 text-primary"}),a.length," ",a.length===1?"venue":"venues"," offering"," ",s.noun]}),e.jsx("div",{className:"mt-6 flex flex-wrap gap-2",children:V.filter(t=>t.slug===s.slug||n.venues.filter(i=>(i.services??[]).some(r=>N(r)===t.slug)).length>=S).map(t=>{const i=t.slug===s.slug;return e.jsx(d,{href:`/cities/${n.slug}/${t.slug}`,className:i?"px-3 py-1.5 rounded-full text-sm font-medium bg-primary text-primary-foreground":"px-3 py-1.5 rounded-full text-sm font-medium bg-background border hover:border-primary/40 transition-colors",children:t.label},t.slug)})})]})}),e.jsx(Q,{featureType:"service",featureLabel:s.label,featureNoun:s.noun,pluralTypeLabel:"services",initialCitySlug:n.slug}),e.jsx("div",{className:"container mx-auto px-4 py-12",children:a.length===0?e.jsxs("div",{className:"text-center py-20 bg-card rounded-xl border border-dashed",children:[e.jsx("h3",{className:"text-lg font-medium",children:"No venues yet"}),e.jsxs("p",{className:"text-muted-foreground",children:["No venues in ",n.name," currently list ",s.noun,"."]})]}):e.jsxs("div",{children:[e.jsxs("h2",{className:"text-2xl font-bold mb-6 border-b pb-4",children:["All ",s.label," venues in ",n.name]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map(t=>e.jsx(_,{venue:t},t.id))})]})}),b.length>0&&e.jsx("div",{className:"container mx-auto px-4 pb-12",children:e.jsxs("div",{className:"bg-card border rounded-xl p-6",children:[e.jsxs("h2",{className:"text-lg font-bold mb-1",children:["Simulator technology for ",s.label.toLowerCase()," in"," ",n.name]}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["The launch monitors and simulator brands running at ",n.name," ","venues that offer ",s.noun,"."]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:b.map(t=>e.jsxs(d,{href:`/technology/${N(t.name)}`,className:"inline-flex items-center gap-2 rounded-full bg-background border px-3 py-1.5 text-sm font-medium hover:border-primary/40 transition-colors",children:[e.jsx("span",{children:t.name}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.count," ",t.count===1?"venue":"venues"]})]},t.name))})]})}),e.jsx(X,{heading:`${s.label} in ${n.name}: FAQ`,faqs:h})]})}export{le 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.