1import{u as X,b as K,d as P,j as e}from"./vendor-query-FUs4xmix.js";import{b as ee,d as te,r,R as se}from"./vendor-react-yxxbvljv.js";import{u as le,o as ae,s as j,e as re}from"./vendor-forms-DzZV2u9q.js";import{t as ne}from"./zod-Dj-CsTan.js";import{u as m,b as x,g as ie}from"./index-CJ3gizb-.js";import{i as oe,aq as F,am as ce,X as de,F as _,ag as Ne,L as Ee,aa as k,ad as xe,a5 as V,a9 as pe,a as me,ae as ue,af as ge,ac as ye,ao as be,Q as he,R as Te}from"./vendor-ui-CcFNq8v7.js";import{d as W}from"./de-ClAyPvMO.js";const U={rechnungen:["NEBENKOSTEN","NEBENKOSTENABRECHNUNG","STROMRECHNUNG","GASRECHNUNG","HANDY","INTERNET","HANDWERKER","BAUMARKT","GEZ","BEHOERDEN","KUENDIGUNG","MIETERHOEHUNG","SONSTIGE_BELEGE","PV_ANLAGE","WAERMEPUMPE"],banking:["BANKING","DARLEHEN","GRUNDBUCH","FINANZAMT","NOTAR","SONSTIGE_UNTERLAGEN"],verwaltung:["HAUSVERWALTUNG","WEG","NOTAR_BEHOERDEN","SCHUFA","JURISTISCHE_DOKUMENTE","OTHER","LEASE","UTILITY","INSURANCE","TELECOM","ELECTRICITY","GAS"]},Re={rechnungen:{label:"Rechnungen & Belege",icon:Te,color:"indigo"},banking:{label:"Finanzen & Darlehen",icon:he,color:"emerald"},verwaltung:{label:"Verwaltung",icon:be,color:"yellow"}},Ae={indigo:{iconBg:"bg-indigo-100",iconColor:"text-indigo-600"},emerald:{iconBg:"bg-emerald-100",iconColor:"text-emerald-600"},yellow:{iconBg:"bg-yellow-100",iconColor:"text-yellow-600"}};function fe(){const{t}=m();return{NEBENKOSTEN:t("docs.type.NEBENKOSTEN"),NEBENKOSTENABRECHNUNG:t("docs.type.NEBENKOSTENABRECHNUNG"),STROMRECHNUNG:t("docs.type.STROMRECHNUNG"),GASRECHNUNG:t("docs.type.GASRECHNUNG"),HANDY:t("docs.type.HANDY"),INTERNET:t("docs.type.INTERNET"),HANDWERKER:t("docs.type.HANDWERKER"),BAUMARKT:t("docs.type.BAUMARKT"),GEZ:t("docs.type.GEZ"),BEHOERDEN:t("docs.type.BEHOERDEN"),SONSTIGE_BELEGE:t("docs.type.SONSTIGE_BELEGE"),PV_ANLAGE:t("docs.type.PV_ANLAGE"),WAERMEPUMPE:t("docs.type.WAERMEPUMPE"),KUENDIGUNG:t("docs.type.KUENDIGUNG"),MIETERHOEHUNG:t("docs.type.MIETERHOEHUNG"),BANKING:t("docs.type.BANKING"),DARLEHEN:t("docs.type.DARLEHEN"),GRUNDBUCH:t("docs.type.GRUNDBUCH"),FINANZAMT:t("docs.type.FINANZAMT"),NOTAR:t("docs.type.NOTAR"),SONSTIGE_UNTERLAGEN:t("docs.type.SONSTIGE_UNTERLAGEN"),HAUSVERWALTUNG:t("docs.type.HAUSVERWALTUNG"),WEG:t("docs.type.WEG"),NOTAR_BEHOERDEN:t("docs.type.NOTAR_BEHOERDEN"),SCHUFA:t("docs.type.SCHUFA"),JURISTISCHE_DOKUMENTE:t("docs.type.JURISTISCHE_DOKUMENTE"),OTHER:t("docs.type.OTHER"),LEASE:t("contracts.cat.mietvertrag"),UTILITY:t("docs.type.NEBENKOSTEN"),INSURANCE:t("contracts.cat.versicherung"),TELECOM:t("docs.type.INTERNET"),ELECTRICITY:t("contracts.cat.strom"),GAS:t("contracts.cat.gas")}}function ve(){const{t}=m();return[{value:"",label:t("common.allTypes")},{value:"NEBENKOSTEN",label:t("docs.type.NEBENKOSTEN")},{value:"NEBENKOSTENABRECHNUNG",label:t("docs.type.NEBENKOSTENABRECHNUNG")},{value:"STROMRECHNUNG",label:t("docs.type.STROMRECHNUNG")},{value:"GASRECHNUNG",label:t("docs.type.GASRECHNUNG")},{value:"HANDY",label:t("docs.type.HANDY")},{value:"INTERNET",label:t("docs.type.INTERNET")},{value:"HANDWERKER",label:t("docs.type.HANDWERKER")},{value:"BAUMARKT",label:t("docs.type.BAUMARKT")},{value:"GEZ",label:t("docs.type.GEZ")},{value:"BEHOERDEN",label:t("docs.type.BEHOERDEN")},{value:"SONSTIGE_BELEGE",label:t("docs.type.SONSTIGE_BELEGE")},{value:"PV_ANLAGE",label:t("docs.type.PV_ANLAGE")},{value:"WAERMEPUMPE",label:t("docs.type.WAERMEPUMPE")},{value:"KUENDIGUNG",label:t("docs.type.KUENDIGUNG")},{value:"MIETERHOEHUNG",label:t("docs.type.MIETERHOEHUNG")},{value:"BANKING",label:t("docs.type.BANKING")},{value:"DARLEHEN",label:t("docs.type.DARLEHEN")},{value:"GRUNDBUCH",label:t("docs.type.GRUNDBUCH")},{value:"FINANZAMT",label:t("docs.type.FINANZAMT")},{value:"NOTAR",label:t("docs.type.NOTAR")},{value:"SONSTIGE_UNTERLAGEN",label:t("docs.type.SONSTIGE_UNTERLAGEN")},{value:"HAUSVERWALTUNG",label:t("docs.type.HAUSVERWALTUNG")},{value:"WEG",label:t("docs.type.WEG")},{value:"NOTAR_BEHOERDEN",label:t("docs.type.NOTAR_BEHOERDEN")},{value:"SCHUFA",label:t("docs.type.SCHUFA")},{value:"JURISTISCHE_DOKUMENTE",label:t("docs.type.JURISTISCHE_DOKUMENTE")},{value:"OTHER",label:t("docs.type.OTHER")}
1]}const je={NEBENKOSTEN:"bg-blue-100 text-blue-700",NEBENKOSTENABRECHNUNG:"bg-blue-100 text-blue-700",STROMRECHNUNG:"bg-yellow-100 text-yellow-700",GASRECHNUNG:"bg-orange-100 text-orange-700",HANDY:"bg-pink-100 text-pink-700",INTERNET:"bg-cyan-100 text-cyan-700",HANDWERKER:"bg-amber-100 text-amber-700",BAUMARKT:"bg-lime-100 text-lime-700",GEZ:"bg-purple-100 text-purple-700",BEHOERDEN:"bg-indigo-100 text-indigo-700",SONSTIGE_BELEGE:"bg-gray-100 text-gray-700",PV_ANLAGE:"bg-yellow-100 text-yellow-700",WAERMEPUMPE:"bg-orange-100 text-orange-700",KUENDIGUNG:"bg-red-100 text-red-700",MIETERHOEHUNG:"bg-orange-100 text-orange-700",BANKING:"bg-emerald-100 text-emerald-700",DARLEHEN:"bg-teal-100 text-teal-700",GRUNDBUCH:"bg-emerald-100 text-emerald-700",FINANZAMT:"bg-green-100 text-green-700",NOTAR:"bg-violet-100 text-violet-700",SONSTIGE_UNTERLAGEN:"bg-slate-100 text-slate-700",HAUSVERWALTUNG:"bg-slate-100 text-slate-700",WEG:"bg-slate-200 text-slate-700",NOTAR_BEHOERDEN:"bg-violet-100 text-violet-700",SCHUFA:"bg-red-100 text-red-700",JURISTISCHE_DOKUMENTE:"bg-indigo-100 text-indigo-700",OTHER:"bg-gray-100 text-gray-700",LEASE:"bg-purple-100 text-purple-700",UTILITY:"bg-blue-100 text-blue-700",INSURANCE:"bg-green-100 text-green-700",TELECOM:"bg-cyan-100 text-cyan-700",ELECTRICITY:"bg-yellow-100 text-yellow-700",GAS:"bg-orange-100 text-orange-700"},Ue=["NEBENKOSTEN","STROMRECHNUNG","GASRECHNUNG","HANDY","INTERNET","HANDWERKER","BAUMARKT","GEZ","BEHOERDEN","SONSTIGE_BELEGE","PV_ANLAGE","WAERMEPUMPE","BANKING","DARLEHEN","GRUNDBUCH","FINANZAMT","NOTAR","SONSTIGE_UNTERLAGEN","HAUSVERWALTUNG","WEG","NOTAR_BEHOERDEN","SCHUFA","JURISTISCHE_DOKUMENTE","OTHER"],Ge=ae({name:j().min(1,"Pflichtfeld"),type:re(Ue),propertyId:j().min(1,"Pflichtfeld"),validUntil:j().optional()});function Se(t){return t?t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`:"â"}function He({label:t,onConfirm:c,onCancel:i,isPending:o}){const{t:n}=m();return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:i}),e.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-sm p-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[e.jsx("div",{className:"w-11 h-11 bg-red-100 rounded-full flex items-center justify-center shrink-0",children:e.jsx(V,{className:"w-5 h-5 text-red-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-gray-900",children:"Löschen?"}),e.jsxs("p",{className:"text-sm text-gray-500 mt-0.5",children:["â",t,'" wird unwiderruflich gelöscht.']})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:i,className:"flex-1 btn-secondary",children:n("common.cancel")}),e.jsx("button",{onClick:c,disabled:o,className:"flex-1 bg-red-600 hover:bg-red-700 text-white font-medium py-2 px-4 rounded-lg transition-colors text-sm",children:n(o?"common.deleting":"common.confirmDelete")})]})]})]})}function Ie({groupKey:t,count:c}){const{t:i}=m(),o=Re[t],n=Ae[o.color],h=o.icon;return e.jsxs("div",{className:"flex items-center gap-3 pt-2 pb-1 mt-4",children:[e.jsx("div",{className:`w-7 h-7 ${n.iconBg} rounded-lg flex items-center justify-center`,children:e.jsx(h,{className:`w-4 h-4 ${n.iconColor}`})}),e.jsx("span",{className:"text-sm font-semibold text-gray-700",children:o.label}),e.jsxs("span",{className:"text-xs text-gray-400 bg-gray-100 px-2 py-0.5 rounded-full",children:[c," ",i(c===1?"documents.oneDoc":"documents.manyDocs")]}),e.jsx("div",{className:"flex-1 h-px bg-gray-100"})]})}function Ke(){const{t}=m(),c=fe(),i=ve(),o=ee(),[n,h]=te(),u=n.get("propertyId")??"",[g,G]=r.useState(""),[y,S]=r.useState(""),[Y,H]=r.useState(null),[T,p]=r.useState(null),[R,A]=r.useState(null),[d,N]=r.useState(null),[Z,f]=r.useState(!1),I=r.useRef(null),O=X(),{data:D=[]}=K({queryKey:["properties"],queryFn:()=>x.get("/properties").then(s=>s.data)}),C=r.useMemo(()=>{const s=new Set;return D.filter(l=>s.has(l.property.id)?!1:(s.add(l.property.id),!0))},[D]),{data:b=[],isLoading:$}=K({queryKey:["documents",g,y,u,"all"],queryFn:()=>x.get("/documents",{params:{type:g||void 0,status:y||void 0,propertyId:u||void 0}}).then(s=>s.data)}),E=le({resolver:ne(Ge)}),v=P({mutationFn:async({id:s,data:l})=>
1{if(d){const a=new FormData;return a.append("file",d),a.append("name",l.name),a.append("type",l.type),a.append("propertyId",l.propertyId),l.validUntil&&a.append("validUntil",l.validUntil),await x.post("/documents/upload",a,{headers:{"Content-Type":"multipart/form-data"}}),x.delete(`/documents/${s}`)}return x.patch(`/documents/${s}`,l)},onSuccess:()=>{O.invalidateQueries({queryKey:["documents"]}),p(null),N(null)}}),B=P({mutationFn:s=>x.delete(`/documents/${s}`),onSuccess:()=>{O.invalidateQueries({queryKey:["documents"]}),H(null),A(null)}});function z(s){var l,a;E.reset({name:s.name,type:s.type,propertyId:s.propertyId??((l=s.property)==null?void 0:l.id)??"",validUntil:((a=s.validUntil)==null?void 0:a.slice(0,10))??""}),N(null),p(s)}const w=s=>{const l=new URLSearchParams(n);s?l.set("propertyId",s):l.delete("propertyId"),h(l)},L=u||g||y,q=r.useMemo(()=>{const s=b;return{rechnungen:s.filter(l=>U.rechnungen.includes(l.type)),banking:s.filter(l=>U.banking.includes(l.type)),verwaltung:s.filter(l=>U.verwaltung.includes(l.type))}},[b]),J=s=>{var a,M;const l=Y===s.id;return e.jsxs(se.Fragment,{children:[e.jsxs("div",{onClick:()=>H(l?null:s.id),className:"flex items-center gap-4 p-4 bg-white rounded-xl border border-gray-200 hover:border-gray-300 hover:shadow-sm transition-all cursor-pointer group",children:[e.jsx("div",{className:"w-10 h-10 bg-indigo-50 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(_,{className:"w-5 h-5 text-indigo-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-medium text-gray-900 truncate",children:s.name}),e.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${je[s.type]??"bg-gray-100 text-gray-600"}`,children:c[s.type]??s.type}),s.validUntil&&e.jsxs("span",{className:"text-xs text-gray-400 hidden sm:block",children:["bis ",k(new Date(s.validUntil),"dd.MM.yyyy",{locale:W})]})]}),e.jsx("div",{className:"flex flex-wrap items-center gap-2 mt-0.5",children:e.jsx("p",{className:"text-xs text-gray-400 truncate",children:((a=s.property)==null?void 0:a.name)??"â"})})]}),e.jsx("span",{className:`hidden sm:inline-flex px-2 py-0.5 text-xs font-medium rounded-full flex-shrink-0 ${s.status==="ACTIVE"?"bg-green-100 text-green-700":s.status==="TERMINATED"?"bg-red-100 text-red-700":"bg-gray-100 text-gray-500"}`,children:s.status==="ACTIVE"?t("propertyDetail.statusActive"):s.status==="TERMINATED"?t("propertyDetail.statusTerminated"):t("properties.statusArchived")}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",onClick:Q=>Q.stopPropagation(),children:[e.jsx("button",{onClick:()=>z(s),className:"p-1.5 rounded-lg text-gray-300 hover:text-blue-500 hover:bg-blue-50 transition-all",children:e.jsx(xe,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>A(s),className:"p-1.5 rounded-lg text-gray-300 hover:text-red-500 hover:bg-red-50 transition-all",children:e.jsx(V,{className:"w-4 h-4"})})]}),e.jsx(pe,{className:`w-4 h-4 text-gray-400 flex-shrink-0 transition-transform ${l?"rotate-180":""}`})]}),l&&e.jsxs("div",{className:"mx-4 mb-2 p-4 bg-gray-50 rounded-b-xl border border-t-0 border-gray-200 grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm",children:[((M=s.property)==null?void 0:M.name)&&e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 col-span-2",children:[e.jsx(me,{className:"w-4 h-4 text-gray-400"})," ",s.property.name]}),s.uploadedBy&&e.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[e.jsx(ue,{className:"w-4 h-4 text-gray-400"})," ",s.uploadedBy.firstName," ",s.uploadedBy.lastName]}),s.createdAt&&e.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[e.jsx(ge,{className:"w-4 h-4 text-gray-400"}),k(new Date(s.createdAt),"dd.MM.yyyy",{locale:W})]}),s.fileUrl&&e.jsx("div",{className:"col-span-2 pt-2 border-t border-gray-200",children:e.jsxs("a",{href:ie(s.fileUrl),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-indigo-600 hover:text-indigo-700 font-medium",children:[e.jsx(ye,{className:"w-4 h-4"})," Datei öffnen"]})})]})]},s.id)};return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsx("button",{onClick:()=>o("/contracts"),className:"p-2 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors",children:e.jsx(oe,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"w-10 h-10 bg-indigo-100 rounded-xl flex items-center justify-center",children:e.jsx(F,{className:"w-5 h-5 text-indigo-600"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:t("contracts.allDocuments")}),e.jsxs("p",{className:"text-sm text-gray-500",children:[b.length," Einträge"]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-6 p-4 bg-white rounded-xl border border-gray-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mr-1",children:[e.jsx(ce,{className:"w-4 h-4 text-gray-400"}),e.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Filter:"})]}),e.jsxs("select",{value:u,onChange:s=>w(s.target.value),className:"text-sm border border-gray-300 rounded-lg px-3 py-2 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1 min-w-[140px] max-w-xs",children:[e.jsx("option",{value:"",children:t("common.allProperties")}),C.map(s=>e.jsx("option",{value:s.property.id,children:s.property.name},s.property.id))]}),e.jsx("select",{value:g,onChange:s=>G(s.target.value),className:"text-sm border border-gray-300 rounded-lg px-3 py-2 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:i.map(({value:s,label:l})=>e.jsx("option",{value:s,children:l},s))}),e.jsxs("select",{value:y,onChange:s=>S(s.target.value),className:"text-sm border border-gray-300 rounded-lg px-3 py-2 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:[e.jsx("option",{value:"",children:t("common.allStatus")}),e.jsx("option",{value:"ACTIVE",children:"Aktiv"}),e.jsx("option",{value:"TERMINATED",children:t("propertyDetail.statusTerminated")}),e.jsx("option",{value:"ARCHIVED",children:"Archiviert"})]}),L&&e.jsxs("button",{onClick:()=>{w(""),G(""),S("")},className:"text-sm text-gray-400 hover:text-gray-600 px-2 py-1 rounded-lg hover:bg-gray-100 transition-colors",children:["â ",t("common.reset")]})]}),$?e.jsx("div",{className:"py-16 text-center text-gray-400 text-sm",children:"Lädtâ¦"}):b.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-indigo-100 rounded-2xl flex items-center justify-center mb-4",children:e.jsx(F,{className:"w-8 h-8 text-indigo-400 opacity-50"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-700 mb-1",children:"Keine Dokumente gefunden"}),e.jsx("p",{className:"text-gray-400 text-sm max-w-xs",children:t(L?"common.noFilterResults":"documents.empty")})]}):e.jsx("div",{className:"space-y-1",children:["rechnungen","banking","verwaltung"].map(s=>{const l=q[s];return l.length===0?null:e.jsxs("div",{children:[e.jsx(Ie,{groupKey:s,count:l.length}),e.jsx("div",{className:"space-y-2 mt-2",children:l.map(J)})]},s)})}),T&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>p(null)}),e.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-md",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-100",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Dokument bearbeiten"}),e.jsx("button",{onClick:()=>p(null),className:"p-1 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100",children:e.jsx(de,{size:20})})]}),e.jsxs("form",{onSubmit:E.handleSubmit(s=>v.mutate({id:T.id,data:s})),className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"label",children:[t("documents.replaceFile")," (",t("common.optional"),")"]}),e.jsxs("div",{className:`border-2 border-dashed rounded-xl p-4 text-center cursor-pointer transition-colors ${Z?"border-indigo-400 bg-indigo-50":d?"border-green-400 bg-green-50":"border-gray-200 hover:border-gray-300"}`,onClick:()=>{var s;return(s=I.current)==null?void 0:s.click()},onDragOver:s=>{s.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:s=>{s.preventDefault(),f(!1),N(s.dataTransfer.files[0]??null)},children:[e.jsx("input",{ref:I,type:"file",className:"hidden",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png",onCh
1ange:s=>{var l;return N(((l=s.target.files)==null?void 0:l[0])??null)}}),d?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{size:20,className:"text-green-500 flex-shrink-0"}),e.jsxs("div",{className:"flex-1 text-left min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:d.name}),e.jsx("p",{className:"text-xs text-gray-400",children:Se(d.size)})]}),e.jsx("button",{type:"button",className:"text-xs text-red-500 hover:text-red-600 flex-shrink-0",onClick:s=>{s.stopPropagation(),N(null)},children:"Entfernen"})]}):e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx(Ne,{size:24,className:"text-gray-300"}),e.jsx("p",{className:"text-sm text-gray-500",children:T.fileName??"Klicken um zu ersetzen"})]})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"label",children:[t("common.name")," *"]}),e.jsx("input",{className:"input",...E.register("name")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"label",children:t("common.type")}),e.jsx("select",{className:"input",...E.register("type"),children:i.filter(s=>s.value!=="").map(({value:s,label:l})=>e.jsx("option",{value:s,children:l},s))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"label",children:t("cd.validUntil")}),e.jsx("input",{className:"input",type:"date",...E.register("validUntil")})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"label",children:[t("todos.propertyLabel").replace(" *","")," *"]}),e.jsxs("select",{className:"input",...E.register("propertyId"),children:[e.jsx("option",{value:"",children:t("common.selectPlaceholder")}),C.map(s=>e.jsx("option",{value:s.property.id,children:s.property.name},s.property.id))]})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",className:"btn-secondary flex-1",onClick:()=>{p(null),N(null)},children:"Abbrechen"}),e.jsx("button",{type:"submit",className:"btn-primary flex-1",disabled:v.isPending,children:v.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{size:14,className:"animate-spin"})," Speichert..."]}):"Speichern"})]})]})]})]}),R&&e.jsx(He,{label:R.name,onConfirm:()=>B.mutate(R.id),onCancel:()=>A(null),isPending:B.isPending})]})}export{Ke 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.