1import{ac as f,N as j,s as c,P as b,j as r,L as N,b as v,B as k}from"./index-tp3ZBVoO.js";import{b as d}from"./recharts-D0niEN4L.js";import{L as w}from"./lucide-react-CQh6iBSz.js";import{g as y,a as _}from"./kantoor-data-CnuNrH8Z.js";import{C as K}from"./clipboard-check-DnRTBL0e.js";import{F as S}from"./file-text-Dpvw2thg.js";import{A as C}from"./arrow-right-F5BcStkK.js";import"./activity-16GWb64W.js";import"./unlink-2-DKDLCGv6.js";import"./arrow-down-DIq5ARm1.js";import"./arrow-left-right-Ddcv6g3x.js";import"./refresh-ccw-BWmvCQAM.js";import"./arrow-up-DlZ-CFC3.js";import"./award-CCJUurvi.js";import"./baby-DmRLjePo.js";import"./mail-plus-3e9mHmpZ.js";import"./sun-KY4NPF3T.js";import"./bike-Ffw1AOX3.js";import"./underline-BVgbnTCj.js";import"./book-marked-ua-Cb9mm.js";import"./book-open-BqAaupVO.js";import"./user-y8d2mvpO.js";import"./briefcase-BBRWyobr.js";import"./hourglass-B_u4mkzt.js";import"./calendar-check-DpuF8F8F.js";import"./calendar-days-Bn-pgv5v.js";import"./calendar-range-CY18QRbX.js";import"./calendar-x-D9t08khF.js";import"./calendar-D4qdhQ9j.js";import"./camera-VaTikGoc.js";import"./car-Cfot7UvT.js";import"./chart-column-eY4v4Ily.js";import"./chevron-left-BnpAtFle.js";import"./circle-minus-DFUjn4Nd.js";import"./circle-slash-WKPo5tgv.js";import"./circle-user-DJR0FJfg.js";import"./circle-PatyTUqG.js";import"./clapperboard-DV2jTsaT.js";import"./clipboard-list-B0E_Q9qD.js";import"./code-xml-Dtio1Ou_.js";import"./coins-BjegDPpo.js";import"./compass-LWmNg2zD.js";import"./siren-DLO93Jqd.js";import"./credit-card-Cc5nrUg_.js";import"./earth-DFcfS2yJ.js";import"./eye-_3laSxt7.js";import"./file-braces-DiBOLh4x.js";import"./file-chart-column-Csn2m9cx.js";import"./file-down-hc16bIBG.js";import"./file-pen-line-ZP18dsPs.js";import"./file-CGwCozK1.js";import"./presentation-D6oyoZbK.js";import"./fuel-CecAn-_F.js";import"./funnel-2ksqNL2R.js";import"./mouse-pointer-click-sy9zhHD6.js";import"./gift-DKM23pt4.js";import"./git-compare-Cq6-nfjj.js";import"./glass-water-Bnrr8JqF.js";import"./globe-CONa-xkd.js";import"./graduation-cap-B9HGCkDa.js";import"./grip-vertical-_IiqDB6U.js";import"./hammer-CAVpXWXT.js";import"./handshake-oZJ0Sl4T.js";import"./heart-handshake-u3YIkPSH.js";import"./heart-pulse-mSeS8b3f.js";import"./heart-BUGHVl4C.js";import"./history-C9ZGoN5b.js";import"./image-CJNcoj7H.js";import"./info-NHuVvVc9.js";import"./key-round-DpIM2e9T.js";import"./laptop-ppXaqOjE.js";import"./layers-K6GbOSWE.js";import"./layout-dashboard-CzrWIQYd.js";import"./layout-grid-DivqyqHa.js";import"./library-Bh_iad-H.js";import"./lightbulb-B-nK4ClS.js";import"./thumbs-up-BdS3Xan9.js";import"./list-checks-BJ1Bzeo7.js";import"./lock-CHsbw-4a.js";import"./megaphone-Jr6XvVeU.js";import"./message-circle-question-mark-Cn7PvchC.js";import"./message-circle-BmKJYWJi.js";import"./message-square-text-DpRCCZF9.js";import"./message-square-DRj6P9VR.js";import"./square-y2Ie5DRb.js";import"./minus-CFfNPl1U.js";import"./music-E8mwBRLg.js";import"./trophy-BnyB1I3V.js";import"./package-BJByCP09.js";import"./pause-zAIwSiUh.js";import"./pen-line-B9jBA4mU.js";import"./percent-DY7lfDdE.js";import"./phone-call-C_mZoXUr.js";import"./sofa-C8Ht6lHu.js";import"./play-D-D_K-wy.js";import"./printer-C4LQDpXf.js";import"./quote-C3tWHyOm.js";import"./receipt-CDxdw6QN.js";import"./refresh-cw-BBY-WYhF.js";import"./rocket-BNFGkglP.js";import"./rotate-ccw-DStGrL0z.js";import"./save-WOvGSOCF.js";import"./scale-DXQgrsBf.js";import"./umbrella-PnDWftZh.js";import"./scroll-text-AoTey5nc.js";import"./search-F2k5SEC8.js";import"./settings-2-Die9OIk-.js";import"./settings-EIl4u7b2.js";import"./shield-DZA1rTiU.js";import"./smartphone-ypId9BEC.js";import"./square-pen-8_6346he.js";import"./star-DF5I4nc-.js";import"./tags-zL99P9MI.js";import"./target-C0L-ws7x.js";import"./timer-Dgze6eAu.js";import"./trending-down-BGzPCDvz.js";import"./trending-up-2Jk7Ta4P.js";import"./truck-BGgu_Xfb.js";import"./undo-2-B7Eg19Nu.js";import"./user-plus-Czgmtms6.js";import"./user-round-RF-8Ik5N.js";import"./wallet-CE43XHut.js";import"./wand-sparkles-BtIQtuEC.js";import"./wrench-B7ZGT1_h.js";function Mt(){const{kantoorSlug:t}
1=f.useParams(),[e,i]=d.useState({status:"loading"});return d.useEffect(()=>{let m=!1;return(async()=>{i({status:"loading"});const s=await y(t);if(m)return;if(!s){j(),i({status:"niet-gevonden"});return}const[{data:a},{data:x},g]=await Promise.all([c.from("kantoren_publiek").select("email, telefoon, plaats").eq("id",s.id).maybeSingle(),c.from("tools").select("slug, naam, omschrijving, icon, sortering, embed_pad, actief").eq("actief",!0).or("slug.like.formulier-%,slug.eq.alarmnummers"),_(t)]);if(m)return;const h=new Set(g.map(o=>o.tool_slug)),n=(x??[]).filter(o=>!P(o)).filter(o=>h.has(o.slug)).map(o=>({slug:o.slug,naam:o.naam,omschrijving:o.omschrijving,icon:o.icon,sortering:o.sortering,embed_pad:o.embed_pad})).sort((o,p)=>o.sortering-p.sortering||o.naam.localeCompare(p.naam)),l={...s,email:a?.email??null,telefoon:a?.telefoon??null,plaats:a?.plaats??null};if(b(s),n.length===0){i({status:"geen-scans",kantoor:l});return}i({status:"ok",kantoor:l,scans:n})})(),()=>{m=!0}},[t]),e.status==="loading"?r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx(N,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e.status==="niet-gevonden"?r.jsxs(u,{titel:"Kantoor niet gevonden",children:[r.jsxs("p",{className:"text-muted-foreground",children:["Het adres ",r.jsxs("code",{className:"bg-muted px-1.5 py-0.5 rounded",children:["/lf/",t]})," ","hoort niet bij een bekend kantoor."]}),r.jsx("div",{className:"mt-6",children:r.jsx(v,{to:"/",children:r.jsx(k,{variant:"outline",children:"Terug naar home"})})})]}):e.status==="geen-scans"?r.jsx(u,{titel:`${e.kantoor.naam} heeft (nog) geen formulieren geactiveerd`,kantoor:e.kantoor,children:r.jsx("p",{className:"text-muted-foreground",children:"Er zijn voor dit kantoor nog geen formulieren beschikbaar. Neem contact op met YORON voor de mogelijkheden."})}):r.jsx(L,{kantoor:e.kantoor,scans:e.scans,kantoorSlug:t})}function L({kantoor:t,scans:e,kantoorSlug:i}){const m=t.primaire_kleur||void 0;return r.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/30",style:m?{"--primary":m}:void 0,children:[r.jsx("header",{className:"border-b bg-card/60 backdrop-blur",children:r.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-4 flex items-center gap-4",children:[t.logo_url&&r.jsx("img",{src:t.logo_url,alt:t.naam,className:"max-h-12 max-w-[200px] h-auto w-auto object-contain"}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"text-sm text-muted-foreground truncate",children:t.naam}),r.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight truncate",children:"Slimme formulieren"})]})]})}),r.jsxs("main",{className:"mx-auto max-w-5xl px-6 py-8 md:py-12 space-y-8",children:[r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx("div",{className:"hidden sm:flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:r.jsx(K,{className:"h-6 w-6"})}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("h2",{className:"text-2xl md:text-3xl font-bold tracking-tight",children:"Welk formulier heeft u nodig?"}),r.jsxs("p",{className:"text-muted-foreground max-w-3xl",children:["Kies hieronder het formulier dat past bij uw situatie. ",t.naam," helpt u snel verder na verzending."]})]})]}),r.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:e.map(s=>r.jsx(R,{scan:s,kantoorSlug:i},s.slug))})]})]})}function P(t){const e=t.embed_pad.trim();return e==="/lf/{slug}"||e==="/lf"||t.slug==="formulier-overzicht"}function R({scan:t,kantoorSlug:e}){const i=w[t.icon]??S,m=t.embed_pad.replace("{slug}",e);return r.jsx("a",{href:m,className:"group block rounded-xl border bg-card p-5 transition-all hover:shadow-md hover:border-primary/40 active:scale-[0.99]",children:r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:r.jsx(i,{className:"h-5 w-5"})}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("h3",{className:"font-semibold leading-tight",children:t.naam}),t.omschrijving&&r.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:t.omschrijving})]}),r.jsx(C,{className:"h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-primary"})]})})}function u({titel:t,kantoor:e,children:i}){return r.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/40",children:[r.jsx("header",{className:"border-b bg-background/70 backdrop-blur",children:r.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-4 flex items-center justify-between",children:[r.jsx("div",{className:"flex items-center",children:e?.logo_url?r.jsx("img",{src:e.logo_url,alt:e.naam,className:"h-7 w-auto"}):r.jsx("div",{className:"font-semibold tracking-tight",children:e?.naam??"Slimme formulieren"})}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["Powered by"," ",r.jsx("a",{href:"https://www.yoron.nl",target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:"YORON"})]})]})}),r.jsxs("section",{className:"mx-auto max-w-2xl px-6 py-24",children:[r.jsx("h1",{className:"text-3xl font-bold tracking-tight mb-4",children:t}),i]})]})}export{Mt 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.