PageSourceSearch

https://vastgoeddaniel.be/assets/realisations-section-w0rKy2d5.js

js vastgoeddaniel.be collected 2026-10-09 22:04:18 UTC 9,671 bytes, 1 lines download raw bytes

1import{i as e,n as t,t as n}from"./jsx-runtime-CY_MMzgk.js";import{t as r}from"./createLucideIcon-CQL6_7Od.js";import{t as i}from"./link-C3hVJsPA.js";import{t as a}from"./useServerFn-BlR_M09i.js";import{a as o}from"./tabs-v16uC53J.js";import{n as s,t as c}from"./ruler-C5S2GTMJ.js";import{t as l}from"./bed-double-DaNU8vNN.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-Bj5EyOf4.js";import{U as h,V as g,Z as _,p as v,st as y}from"./index-BS6Tz_pS.js";import{l as b}from"./format-CGgVF3Ee.js";import{t as x}from"./listing-image-Crismbjr.js";import{t as S}from"./listing-card-mYEKlc7h.js";var C=r(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),w=r(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),T=e(t(),1),E=n(),D=`vd-compare-v1`;function O({listings:e}){let[t,n]=(0,T.useState)(``),[r,a]=(0,T.useState)(`alle`),[o,s]=(0,T.useState)(``),[c,l]=(0,T.useState)(``),[v,y]=(0,T.useState)(``),[x,O]=(0,T.useState)(``),[k,A]=(0,T.useState)(`alle`),[j,M]=(0,T.useState)(`datum_nieuw`),[N,P]=(0,T.useState)([]);(0,T.useEffect)(()=>{if(!(typeof window>`u`))try{let e=window.localStorage.getItem(D);e&&P(JSON.parse(e))}catch{}},[]),(0,T.useEffect)(()=>{typeof window>`u`||window.localStorage.setItem(D,JSON.stringify(N))},[N]);let F=(0,T.useMemo)(()=>{let n=e.filter(e=>{if(t){let n=t.toLowerCase();if(!e.title.toLowerCase().includes(n)&&!(e.city??``).toLowerCase().includes(n)&&!(e.postcode??``).includes(n))return!1}return!(r!==`alle`&&e.property_type!==r||o&&(e.price??0)<Number(o)||c&&(e.price??1/0)>Number(c)||v&&(e.bedrooms??0)<Number(v)||x&&(e.living_area_m2??0)<Number(x)||k!==`alle`&&e.epc_label!==k)});switch(j){case`prijs_laag`:n=n.slice().sort((e,t)=>(e.price??0)-(t.price??0));break;case`prijs_hoog`:n=n.slice().sort((e,t)=>(t.price??0)-(e.price??0));break;case`featured`:n=n.slice().sort((e,t)=>Number(t.is_featured)-Number(e.is_featured));break;case`datum_oud`:n=n.slice().sort((e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime());break;case`datum_nieuw`:n=n.slice().sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime());break;case`titel_az`:n=n.slice().sort((e,t)=>e.title.localeCompare(t.title));break;case`titel_za`:n=n.slice().sort((e,t)=>t.title.localeCompare(e.title));break}return n},[e,t,r,o,c,v,x,k,j]),I=e=>{P(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=4?t:[...t,e])};return(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 shadow-soft`,children:[(0,E.jsx)(`h2`,{className:`sr-only`,children:`Panden filteren`}),(0,E.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2 lg:grid-cols-4`,children:[(0,E.jsx)(g,{id:`lb-q`,"aria-label":`Zoek op titel, gemeente of postcode`,placeholder:`Zoek op titel, gemeente of postcode…`,value:t,onChange:e=>n(e.target.value)}),(0,E.jsxs)(m,{value:r,onValueChange:a,children:[(0,E.jsx)(d,{id:`lb-type`,"aria-label":`Type pand`,children:(0,E.jsx)(u,{placeholder:`Type`})}),(0,E.jsxs)(f,{children:[(0,E.jsx)(p,{value:`alle`,children:`Alle types`}),Object.keys(b).map(e=>(0,E.jsx)(p,{value:e,children:b[e]},e))]})]}),(0,E.jsxs)(`div`,{className:`flex gap-2`,children:[(0,E.jsx)(g,{id:`lb-min-price`,"aria-label":`Minimum prijs in euro`,type:`number`,placeholder:`Min €`,value:o,onChange:e=>s(e.target.value)}),(0,E.jsx)(g,{id:`lb-max-price`,"aria-label":`Maximum prijs in euro`,type:`number`,placeholder:`Max €`,value:c,onChange:e=>l(e.target.value)})]}),(0,E.jsxs)(m,{value:j,onValueChange:e=>M(e),children:[(0,E.jsx)(d,{id:`lb-sort`,"aria-label":`Sorteren`,children:(0,E.jsx)(u,{})}),(0,E.jsxs)(f,{children:[(0,E.jsx)(p,{value:`datum_nieuw`,children:`Nieuwste eerst`}),(0,E.jsx)(p,{value:`standaard`,children:`Standaard`}),(0,E.jsx)(p,{value:`featured`,children:`Uitgelicht eerst`}),(0,E.jsx)(p,{value:`prijs_laag`,children:`Prijs laag → hoog`}),(0,E.jsx)(p,{value:`prijs_hoog`,children:`Prijs hoog → laag`}),(0,E.jsx)(p,{value:`datum_oud`,children:`Datum oud → nieuw`}),(0,E.jsx)(p,{value:`titel_az`,children:`Titel A → Z`}),(0,E.jsx)(p,{value:`titel_za`,children:`Titel Z → A`})]})]})]}),(0,E.jsxs)(`div`,{className:`mt-3 grid gap-3 md:grid-cols-4`,children:[(0,E.jsx)(g,{id:`lb-min-beds`,"aria-label":`Minimum aantal slaapkamers`,type:`number`,placeholder:`Min. slaapkamers`,value:v,onCh
1ange:e=>y(e.target.value)}),(0,E.jsx)(g,{id:`lb-min-area`,"aria-label":`Minimum bewoonbare oppervlakte in m²`,type:`number`,placeholder:`Min. m² bewoonbaar`,value:x,onChange:e=>O(e.target.value)}),(0,E.jsxs)(m,{value:k,onValueChange:A,children:[(0,E.jsx)(d,{id:`lb-epc`,"aria-label":`EPC-label`,children:(0,E.jsx)(u,{placeholder:`EPC`})}),(0,E.jsxs)(f,{children:[(0,E.jsx)(p,{value:`alle`,children:`Alle EPC`}),[`A+`,`A`,`B`,`C`,`D`,`E`,`F`].map(e=>(0,E.jsxs)(p,{value:e,children:[`EPC `,e]},e))]})]}),(0,E.jsxs)(h,{variant:`ghost`,onClick:()=>{n(``),a(`alle`),s(``),l(``),y(``),O(``),A(`alle`)},children:[(0,E.jsx)(_,{className:`h-4 w-4`}),` Filters wissen`]})]})]}),(0,E.jsx)(`div`,{className:`mt-6 flex items-center justify-between`,children:(0,E.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,E.jsx)(w,{className:`mr-1.5 inline h-3.5 w-3.5`}),F.length,` van `,e.length,` panden`]})}),(0,E.jsx)(`div`,{className:`mt-4 grid gap-6 sm:grid-cols-2 lg:grid-cols-3`,children:F.map(e=>(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(S,{listing:e}),(0,E.jsxs)(`button`,{onClick:()=>I(e.id),className:`absolute right-3 top-3 z-10 inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-[10px] font-medium uppercase tracking-widest shadow `+(N.includes(e.id)?`bg-accent text-accent-foreground`:`bg-background/90 text-foreground hover:bg-accent hover:text-accent-foreground`),title:`Vergelijken`,children:[(0,E.jsx)(C,{className:`h-3 w-3`}),N.includes(e.id)?`In vergelijking`:`Vergelijk`]})]},e.id))}),F.length===0&&(0,E.jsx)(`p`,{className:`mt-10 rounded-lg border border-dashed border-border p-12 text-center text-muted-foreground`,children:`Geen panden gevonden met deze filters.`}),N.length>0&&(0,E.jsx)(`div`,{className:`fixed bottom-4 left-1/2 z-40 -translate-x-1/2 rounded-full border border-border bg-background px-4 py-3 shadow-lift`,children:(0,E.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,E.jsxs)(`span`,{className:`font-medium`,children:[N.length,` in vergelijking`]}),(0,E.jsx)(h,{asChild:!0,variant:`forest`,size:`sm`,children:(0,E.jsx)(i,{to:`/vergelijken`,children:`Vergelijk nu`})}),(0,E.jsxs)(h,{variant:`ghost`,size:`sm`,onClick:()=>P([]),children:[(0,E.jsx)(_,{className:`h-3 w-3`}),` Leegmaken`]})]})})]})}var k={verkocht:`Verkocht`,verhuurd:`Verhuurd`,verkocht_binnen_de_week:`Verkocht binnen de week`,verkocht_binnen_de_maand:`Verkocht binnen de maand`};function A({transaction:e,title:t,subtitle:n}){let r=a(v),{data:u}=y({queryKey:[`public`,`realisations`,e],queryFn:()=>r({data:{transaction:e,limit:24}}),staleTime:5*6e4}),d=u??[];return d.length===0?null:(0,E.jsxs)(`section`,{className:`mt-20 border-t border-border pt-14`,children:[(0,E.jsxs)(`header`,{className:`mb-8 flex flex-col gap-2 md:flex-row md:items-end md:justify-between`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-xs uppercase tracking-[0.3em] text-accent`,children:`Realisaties`}),(0,E.jsx)(`h2`,{className:`mt-2 font-display text-3xl md:text-4xl`,children:t})]}),(0,E.jsx)(`p`,{className:`max-w-lg text-sm text-muted-foreground`,children:n})]}),(0,E.jsx)(`div`,{className:`grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3`,children:d.map(e=>(0,E.jsx)(`article`,{className:`group overflow-hidden rounded-xl border border-border bg-card transition hover:border-accent/60 hover:shadow-lg`,children:(0,E.jsxs)(i,{to:`/realisaties/$id`,params:{id:e.id},className:`block`,children:[(0,E.jsxs)(`div`,{className:`relative aspect-[4/3] overflow-hidden bg-muted`,children:[(0,E.jsx)(x,{path:e.image_url,alt:e.title,className:`h-full w-full object-cover transition duration-500 group-hover:scale-105`}),(0,E.jsx)(`span`,{className:`absolute left-3 top-3 rounded-full bg-primary px-3 py-1 text-[10px] font-semibold uppercase tracking-widest text-primary-foreground shadow`,children:k[e.badge]??`Verkocht`})]}),(0,E.jsxs)(`div`,{className:`p-5`,children:[(0,E.jsx)(`h3`,{className:`line-clamp-2 min-h-[3rem] font-display text-lg leading-snug`,children:e.title}),(e.address||e.city)&&(0,E.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:[e.address,e.city].filter(
1Boolean).join(`, `)}),(e.bedrooms||e.bathrooms||e.area_m2)&&(0,E.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-4 text-xs text-muted-foreground`,children:[e.bedrooms?(0,E.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,E.jsx)(l,{className:`h-3.5 w-3.5`}),` `,e.bedrooms]}):null,e.bathrooms?(0,E.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,E.jsx)(s,{className:`h-3.5 w-3.5`}),` `,e.bathrooms]}):null,e.area_m2?(0,E.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,E.jsx)(c,{className:`h-3.5 w-3.5`}),` `,e.area_m2,` m²`]}):null,(0,E.jsx)(`span`,{className:`ml-auto inline-flex items-center gap-1 text-accent`,children:(0,E.jsx)(o,{className:`h-3.5 w-3.5`})})]})]})]})},e.id))})]})}export{O as n,A as t};

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.