1import{w as P,v as E,y as w,r as l,j as t}from"./react-BVr0XRre.js";import{s as S,A as v}from"./AppShell-C3Pw53bM.js";import{E as D}from"./EmptyState-BrzHGtIq.js";import{a as N,E as A}from"./usePlan-DhvrWZYd.js";import{P as k}from"./inverterDatabase-B0ixlgXy.js";import{B as T}from"./bootstrap-D8sbAPlT.js";import{S as _}from"./SectionFrame-DRXIpaBo.js";import{u as C,a as R}from"./PlanMenu-_WvqcdgD.js";import{m as u,P as L,a as O}from"./PlanKaart-Bl5JbIwJ.js";import{u as U}from"./i18n-B9fAX0Sq.js";import{U as f,y as B}from"./icons-DU9T6Sex.js";import"./radix-CUobqZap.js";import"./schakelaars-C52tJ-dM.js";import"./plansRepository-BJuP0gRU.js";import"./invokeEdgeFunction-BcJnJudb.js";import"./three-UcUPrV54.js";import"./index-9VQF1MAC.js";import"./supabase-BsYbaV5t.js";import"./forms-BBcPh00S.js";import"./geometry-CAONBTPY.js";import"./DossierWorkspace-Bm-_n7n6.js";import"./sectionStatus-W0TAYSc4.js";import"./logger-C0lRlCnk.js";import"./textarea-_Zcl5Pal.js";import"./VoiceInputButton-CqTGxoV6.js";import"./StatusChip-ChnvOhFD.js";import"./floorClustering-C2FKQ-pT.js";import"./dossier-C856hdub.js";import"./statusStyles-Cuk_fl4R.js";import"./bereken-6gw6WigT.js";import"./eenheden-CZ0JRyih.js";import"./vekaExportHelpers-CWKVCeIG.js";import"./schil-BSoUmVPv.js";import"./volumeOnderDak-P-dxtOXe.js";import"./hash-k8nmtyra.js";import"./regels-DP6VmtHx.js";import"./splitPolygon-K-ulL19C.js";import"./alert-dialog-B5hklNMT.js";import"./useMediaQuery-Cr6OdArq.js";import"./alert-Dea8JqNP.js";import"./select-D-bHO1KX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"1.0.0+32bb6a0"};var r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="ed83cc1d-2e6e-4dd2-8e5d-b5183129dec8",e._sentryDebugIdIdentifier="sentry-dbid-ed83cc1d-2e6e-4dd2-8e5d-b5183129dec8")}catch{}})();function ve(){const{t:e}=U(),{id:r}=P(),d=E(),[g,a]=w(),i=N(r),{importeer:h,opnieuw:x}=C(),p=i.data,c=R(u(p??[],Date.now()).some(n=>n.status.bezig)),s=l.useMemo(()=>u(p??[],c),[p,c]),y=g.get("importeren")==="1",o=l.useCallback(()=>a({importeren:"1"}),[a]),m=S();l.useEffect(()=>(m({label:e("plannen.importeren"),icon:f,onClick:o}),()=>m(null)),[m,o,e]);const b=async n=>{const I=await h(n);d(`/dossier/${n.dossierId}/plannen/${I}`)},j=()=>i.isLoading?t.jsx(k,{variant:"cards"}):i.isError?t.jsx(A,{title:e("plannen.fout.laden"),description:e("plannen.fout.ladenUitleg"),onRetry:()=>void i.refetch()}):s.length===0?t.jsx(D,{icon:B,title:e("plannen.leeg.titel"),description:e("plannen.leeg.uitleg"),actionLabel:e("plannen.importeren"),onAction:o}):t.jsx("ul",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:s.map(n=>t.jsx("li",{children:t.jsx(O,{item:n,onOpnieuw:x,onImporteer:o})},n.plan.id))});return t.jsxs(v,{children:[t.jsx(_,{dossierId:r,sectionKey:"plannen",title:e("sectie.plannen"),header:!0,children:t.jsxs("div",{className:"space-y-5 px-4 py-6 md:px-6","data-testid":"plannen-inhoud",children:[s.length>0&&t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:e("plannen.teller",{count:s.length})}),t.jsxs(T,{className:"h-11 shrink-0 md:hidden",onClick:o,children:[t.jsx(f,{"aria-hidden":!0}),e("plannen.importeren")]})]}),j()]})}),t.jsx(L,{open:y,onOpenChange:n=>n?o():a({}),dossierId:r??null,onImporteer:b})]})}export{ve 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.