1import{bL as h,r as p,F as g,G as f,H as j,a as b,j as e,L as y,aZ as N,b as i,bE as w,S as d,M as v,bM as S}from"./index-BY0BUQGK.js";import{B as C}from"./breadcrumbs--r2PI-mZ.js";import{i as L}from"./builders-wxPRIGpg.js";import"./operator-profiles-C3Ca3qmz.js";function K(){const{data:m,isLoading:u}=h({query:{queryKey:S()}}),c=m??[],n=p.useMemo(()=>{const s=new Map;for(const a of c){if(!g(a.state))continue;const t=s.get(a.state);t?t.courses.push(a):s.set(a.state,{code:a.state,name:j(a.state),slug:f(a.state),courses:[a]})}const r=[...s.values()];r.sort((a,t)=>a.name.localeCompare(t.name));for(const a of r)a.courses.sort((t,x)=>t.name.localeCompare(x.name));return r},[c]),l=n.map(s=>({code:s.code,name:s.name,slug:s.slug,courseCount:s.courses.length})),o=L({states:l,totalCourses:l.reduce((s,r)=>s+r.courseCount,0),origin:typeof window<"u"?window.location.origin:""});return b({title:o.title,description:o.description,url:o.canonical,jsonLd:o.jsonLd}),e.jsxs(y,{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(C,{items:[{name:"Home",href:"/"},{name:"Golf Courses"}]})}),e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("span",{className:"bg-primary/10 text-primary p-2.5 rounded-lg",children:e.jsx(N,{className:"w-6 h-6"})}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight text-foreground",children:"Golf Courses with Simulators Nearby"})]}),e.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl",children:o.description}),e.jsxs(i,{href:"/courses/search",className:"mt-6 inline-flex items-center gap-2 rounded-lg border bg-background px-4 py-2 text-sm font-medium hover:border-primary hover:text-primary transition-colors",children:[e.jsx(w,{className:"w-4 h-4","aria-hidden":"true"}),"Search all golf courses by name, city, or access"]})]})}),e.jsxs("div",{className:"container mx-auto px-4 py-12",children:[u?e.jsx("div",{className:"space-y-8",children:[1,2,3].map(s=>e.jsxs("div",{children:[e.jsx(d,{className:"h-7 w-40 mb-4"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:[1,2,3,4,5,6].map(r=>e.jsx(d,{className:"h-10 rounded-lg"},r))})]},s))}):n.length===0?e.jsx("div",{className:"py-12 text-center bg-card rounded-xl border border-dashed",children:e.jsx("p",{className:"text-muted-foreground",children:"No golf courses with nearby simulators are listed yet."})}):e.jsx("div",{className:"space-y-10",children:n.map(s=>e.jsxs("section",{children:[e.jsx("h2",{className:"text-xl font-bold mb-1",children:e.jsx(i,{href:`/states/${s.slug}`,className:"hover:text-primary hover:underline",children:s.name})}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:[s.courses.length," ",s.courses.length===1?"course":"courses"," with simulators nearby"]}),e.jsx("ul",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-1",children:s.courses.map(r=>e.jsx("li",{children:e.jsxs(i,{href:`/courses/${r.slug}`,className:"flex items-center justify-between gap-3 py-2 border-b hover:text-primary transition-colors",children:[e.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(v,{className:"w-4 h-4 shrink-0 text-primary/70","aria-hidden":"true"}),e.jsx("span",{className:"truncate font-medium",children:r.name})]}),e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:r.city})]})},r.slug))})]},s.code))}),e.jsxs("p",{className:"mt-10 text-xs text-muted-foreground",children:["Course data ©"," ",e.jsx("a",{href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"OpenStreetMap"})," ","contributors."]})]})]})}export{K 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.