1import{a2 as o,a3 as c,j as e,H as m,L as t,a4 as x,J as u,S as g,D as p,P as h,a5 as b,F as j}from"./index-DUiXJ36l.js";import{u as f}from"./useSuspenseQuery-eAo7DuFF.js";function v(){const{data:l}=f(o(c.useParams().slug));if(!l)return null;const{society:s,stats:a,listings:i,similar:d}=l,n=s.cover_image_url;return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(m,{}),e.jsxs("main",{children:[e.jsx("section",{className:"border-b border-border bg-card",children:e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsxs("nav",{className:"mb-3 text-xs text-muted-foreground",children:[e.jsx(t,{to:"/",className:"hover:text-primary",children:"Home"})," "," / ",s.cities?.slug&&e.jsxs(e.Fragment,{children:[e.jsx(t,{to:`/buy/${s.cities.slug}`,className:"hover:text-primary",children:s.cities.name})," / "]}),e.jsx("span",{className:"text-foreground",children:s.name})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-[1.5fr_1fr]",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground",children:s.name}),e.jsxs("p",{className:"mt-1 flex items-center gap-1 text-sm text-muted-foreground",children:[e.jsx(x,{className:"size-4"}),[s.localities?.name,s.cities?.name].filter(Boolean).join(", ")]}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3 text-sm",children:[a.count>0&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-primary/10 px-3 py-1 font-medium text-primary",children:["â
",a.avg.toFixed(1)," · ",a.count," review",a.count===1?"":"s"]}),s.total_units&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-3 py-1",children:[e.jsx(u,{className:"size-3.5"})," ",s.total_units," units"]}),s.possession_status&&e.jsx("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-3 py-1 capitalize",children:String(s.possession_status).replace(/_/g," ")}),s.builders?.rera_number&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-3 py-1 font-medium text-emerald-700 dark:text-emerald-400",children:[e.jsx(g,{className:"size-3.5"})," RERA ",s.builders.rera_number]})]}),s.description&&e.jsx("p",{className:"mt-4 whitespace-pre-wrap text-sm leading-relaxed text-muted-foreground",children:s.description}),s.builders&&e.jsxs(t,{to:"/builder/$slug",params:{slug:s.builders.slug},className:"mt-5 flex items-center gap-3 rounded-xl border border-border bg-background p-3 transition hover:border-primary",children:[s.builders.logo_url?e.jsx("img",{src:s.builders.logo_url,alt:s.builders.name,className:"size-12 rounded-lg object-cover"}):e.jsx("div",{className:"flex size-12 items-center justify-center rounded-lg bg-muted",children:e.jsx(p,{className:"size-5 text-muted-foreground"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Builder"}),e.jsx("div",{className:"truncate font-semibold text-foreground",children:s.builders.name}),s.builders.established_year&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Est. ",s.builders.established_year]})]})]})]}),n&&e.jsx("div",{className:"overflow-hidden rounded-2xl border border-border",children:e.jsx("img",{src:n,alt:s.name,className:"aspect-[4/3] w-full object-cover",loading:"eager",decoding:"async"})})]})]})}),e.jsxs("section",{className:"container mx-auto px-4 py-10",children:[e.jsxs("h2",{className:"text-xl font-bold text-foreground",children:["Properties in ",s.name," ",e.jsxs("span",{className:"text-sm font-normal text-muted-foreground",children:["(",i.length,")"]})]}),i.length===0?e.jsx("p",{className:"mt-4 rounded-xl border border-dashed border-border p-8 text-center text-sm text-muted-foreground",children:"No live listings inside this society yet. Check back soon."}):e.jsx("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:i.map(r=>e.jsx(h,{p:r},r.id))})]}),e.jsx("div",{className:"container mx-auto px-4",children:e.jsx(b,{societyId:s.id,societyName:s.name})}),d.length>0&&e.jsxs("section",{className:"container mx-auto px-4 py-10",children:[e.jsxs("h2",{className:"text-xl font-bold text-foreground",children:["Similar societies in ",s.cities?.name]}),e.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:d.map(r=>e.jsx("li",{children:e.jsxs(t,{to:"/society/$slug",params:{slug:r.slug},className:"block rounded-xl border border-border bg-card p-4 transition hover:border-primary hover:bg-card/80",children:[e.jsx("div",{className:"font-semibold text-foreground",children:r.name}),r.locality_name&&e.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:r.locality_name})]})},r.id))})]})]}),e.jsx(j,{})]})}
1export{v as component};
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.