1import{u as te,r as P,j as e,w as g,K as N,N as y,$ as d,G as x,H as h,J as u,x as b,O as K,o as le,s as oe}from"./index-MoAbC8_9.js";import{O as ce}from"./OwnersLayout-Cd0M3dw8.js";import{B as me}from"./badge-BHbYeRgi.js";import{T as de,a as xe,b as X,c as _,d as he,e as w}from"./table-BNHSYido.js";import{I as j}from"./info-CZr0REZX.js";import{F as ue}from"./flame-wMx8KIS8.js";import{T as O}from"./trending-up-Cg9WFJWB.js";import{T as R}from"./trending-down-EHPUNHPt.js";import{D as ee}from"./droplets-Cp2l0Gq2.js";import{C as se}from"./chart-column-Bo5i9GGE.js";import{G as je}from"./gauge-CDjYpgNp.js";import{R as A,C as E,X as F,Y as T,T as $,L as I,B as L}from"./generateCategoricalChart-C2b_mvpD.js";import{C as M,A as pe}from"./ComposedChart-DcPErJ04.js";import{L as V}from"./Line-DFydwSLz.js";import"./Header-CnJGZ8vQ.js";import"./mountain-BHfTfCFy.js";import"./user-Cvsz7Lm_.js";import"./separator-CQ84aZ0V.js";import"./collapsible-BIxz44zB.js";import"./skeleton-ClxqB572.js";import"./breadcrumb-CmKLwRya.js";import"./switch-BHj3-8MN.js";import"./index-D9-GACGG.js";import"./house-DjS1WMqx.js";import"./receipt-DnGXta2k.js";import"./building-crte1H4H.js";import"./file-text-Bif0RP8Y.js";import"./upload-BH1HltYO.js";import"./piggy-bank-DP-A2O0m.js";import"./landmark-C0TkBs1l.js";import"./users-xui-UtA1.js";import"./euro-Cc6O9qjZ.js";import"./eye-DKrvAixa.js";import"./dialog-DrI7Oddz.js";import"./tabs-5EVsfllK.js";import"./textarea-4z16PwID.js";import"./index-Dh4i1-J3.js";const fe=({heatingCosts:o})=>{const{language:v}=te(),a=o.length>0?o.reduce((s,r)=>r.year>s.year?r:s,o[0]):null,i=o.length>1?o.filter(s=>s.year<((a==null?void 0:a.year)||0)).reduce((s,r)=>r.year>s.year?r:s,o[0]):null,G=a?Number(a.wärmekosten_net):0,S=a?Number(a.wärmekosten_gross||a.wärmekosten_net*1.2):0,D=i?Number(i.wärmekosten_gross||i.wärmekosten_net*1.2):0,k=D>0?(S-D)/D*100:0,c=a?Number(a.oil_consumption_liters):0,q=a?Number(a.total_heating_area_sqm):0;a&&Number(a.cost_per_sqm);const re=a?Number(a.oil_price_per_liter):0,J=q>0?c/q:0,W=i&&i.total_heating_area_sqm>0?Number(i.oil_consumption_liters)/Number(i.total_heating_area_sqm):0,z=W>0?(J-W)/W*100:0,U=c>0?S/c:0,ae=c>0?G/c:0,B=i&&Number(i.oil_consumption_liters)>0?Number(i.wärmekosten_gross||i.wärmekosten_net*1.2)/Number(i.oil_consumption_liters):0,H=B>0?(U-B)/B*100:0;i&&Number(i.cost_per_sqm);const f=P.useMemo(()=>o.sort((s,r)=>s.year-r.year).map(s=>({year:s.year.toString(),totalCost:Number(s.wärmekosten_gross||s.wärmekosten_net*1.2),totalCostNet:Number(s.wärmekosten_net),oilConsumption:Number(s.oil_consumption_liters),costPerSqm:Number(s.cost_per_sqm)*1.2,costPerSqmNet:Number(s.cost_per_sqm),oilPrice:Number(s.oil_price_per_liter),heatingDays:s.heating_days||0,electricityCost:Number(s.electricity_cost),maintenanceCost:Number(s.maintenance_cost),oilCost:Number(s.oil_cost_gross),oilPerSqm:Number(s.total_heating_area_sqm)>0?Number(s.oil_consumption_liters)/Number(s.total_heating_area_sqm):0,efficiencyGross:Number(s.oil_consumption_liters)>0?Number(s.wärmekosten_gross||s.wärmekosten_net*1.2)/Number(s.oil_consumption_liters):0,efficiencyNet:Number(s.oil_consumption_liters)>0?Number(s.wärmekosten_net)/Number(s.oil_consumption_liters):0})),[o]),Y=P.useMemo(()=>o.sort((s,r)=>s.year-r.year).map(s=>{Number(s.oil_cost_net);const r=Number(s.oil_cost_gross),m=Number(s.electricity_cost),l=Number(s.maintenance_cost),C=Number(s.wärmekosten_net),Q=Number(s.wärmekosten_gross||s.wärmekosten_net*1.2),ie=Q-C;return{year:s.year.toString(),oil:r,electricity:m,maintenance:l,vat:ie,total:Q,totalNet:C}}),[o]),Z=P.useMemo(()=>{const s=f.length>0?f.reduce((r,m)=>r+m.oilPerSqm,0)/f.length:0;return f.map(r=>({...r,avgOilPerSqm:s}))},[f]),n=s=>new Intl.NumberFormat(v==="de"?"de-DE":v==="cs"?"cs-CZ":"en-GB",{style:"currency",currency:"EUR"}).format(s),p=(s,r=0)=>new Intl.NumberFormat(v==="de"?"de-DE":v==="cs"?"cs-CZ":"en-GB",{minimumFractionDigits:r,maximumFractionDigits:r}).format(s),ne=s=>{if(!s)return null;const r=s.match(/Period:\s*(\d{2}\.\d{2}\.\d{4})\s*[-â]\s*(\d{2}\.\d{2}\.\d{4})/i);return r?{start:r[1],end:r[2]}:null},t=(s,r,m)=>v==="de"?s:v==="cs"?m:r;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(g,{className:"border-l-4 border-l-orange-500",children:[e.jsxs(N,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs(y,{className:"text-sm font-medium flex items-center gap-1",children:[t("Gesamtkosten","Total Costs","Celkové náklady")," ",a==null?void 0:a.year,e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsx(j,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),e.jsxs(u,{className:"max-w-xs",children:[e.jsx("p",{className:"font-medium mb-1",children:t("Gesamte Heizkosten","Total Heating Costs","Celkové náklady na topenÃ")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("Summe aller Kosten für Heizöl, Strom und Wartung der Heizungsanlage im Heizraum.","Sum of all costs for heating oil, electricity and boiler maintenance.","SouÄet vÅ¡ech nákladů na topný olej, elektÅinu a údržbu kotelny.")})]})]})})]}),e.jsx(ue,{className:"h-4 w-4 text-orange-500"})]}),e.jsxs(b,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n(S)}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t("inkl. MwSt","incl. VAT","vÄ. DPH")," · ",n(G)," ",t("netto","net","netto")]}),k!==0&&e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[k>0?e.jsx(O,{className:"h-3 w-3 text-destructive"}):e.jsx(R,{className:"h-3 w-3 text-green-600"}),e.jsxs("span",{className:`text-xs ${k>0?"text-destructive":"text-green-600"}`,children:[k>0?"+":"",p(k,1),"%",t(" vs. Vorjahr"," vs prev"," oproti loÅsku")]})]})]})]}),e.jsxs(g,{className:"border-l-4 border-l-amber-600",children:[e.jsxs(N,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs(y,{className:"text-sm font-medium flex items-center gap-1",children:[t("Ãlverbrauch","Oil Consumption","SpotÅeba oleje"),e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsx(j,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),e.jsxs(u,{className:"max-w-xs",children:[e.jsx("p",{className:"font-medium mb-1",children:t("Heizölverbrauch","Heating Oil Consumption","SpotÅeba topného oleje")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("Gesamtmenge des verbrauchten Heizöls in Litern und durchschnittlicher Einkaufspreis pro Liter.","Total heating oil consumed
1in liters and average purchase price per liter.","Celkové množstvà spotÅebovaného oleje v litrech a průmÄrná nákupnà cena za litr.")})]})]})})]}),e.jsx(ee,{className:"h-4 w-4 text-amber-600"})]}),e.jsxs(b,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[p(c)," L"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["à ",n(re),"/L"]})]})]}),e.jsxs(g,{className:"border-l-4 border-l-blue-500",children:[e.jsxs(N,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs(y,{className:"text-sm font-medium flex items-center gap-1",children:[t("Ãl pro m²","Oil per m²","Olej na m²"),e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsx(j,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),e.jsxs(u,{className:"max-w-xs",children:[e.jsx("p",{className:"font-medium mb-1",children:t("Ãlverbrauch pro Quadratmeter","Oil per Square Meter","SpotÅeba oleje na m²")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("Durchschnittlicher Ãlverbrauch bezogen auf die beheizte Gesamtfläche. Ermöglicht Vergleiche zwischen Jahren unabhängig von GebäudegröÃe.","Average oil consumption relative to total heated area. Enables year-over-year comparisons independent of building size.","PrůmÄrná spotÅeba oleje vztažená k celkové vytápÄné ploÅ¡e. UmožÅuje meziroÄnà srovnánà nezávisle na velikosti budovy.")})]})]})})]}),e.jsx(se,{className:"h-4 w-4 text-blue-500"})]}),e.jsxs(b,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[p(J,1)," L/m²"]}),z!==0&&e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[z>0?e.jsx(O,{className:"h-3 w-3 text-destructive"}):e.jsx(R,{className:"h-3 w-3 text-green-600"}),e.jsxs("span",{className:`text-xs ${z>0?"text-destructive":"text-green-600"}`,children:[z>0?"+":"",p(z,1),"%"]})]})]})]}),e.jsxs(g,{className:"border-l-4 border-l-green-600",children:[e.jsxs(N,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs(y,{className:"text-sm font-medium flex items-center gap-1",children:[t("Effizienz","Efficiency","Efektivita"),e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsx(j,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),e.jsxs(u,{className:"max-w-xs",children:[e.jsx("p",{className:"font-medium mb-1",children:t("Kosten pro Liter Ãl","Cost per Liter of Oil","Náklady na litr oleje")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("Gesamtkosten geteilt durch Ãlverbrauch. Zeigt, wie viel ein Liter Heizöl effektiv kostet inkl. Strom und Wartung.","Total costs divi
1ded by oil consumption. Shows effective cost per liter including electricity and maintenance.","Celkové náklady dÄleno spotÅebou oleje. Ukazuje, kolik stojà litr oleje vÄetnÄ elektÅiny a údržby.")})]})]})})]}),e.jsx(je,{className:"h-4 w-4 text-green-600"})]}),e.jsxs(b,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[n(U),"/L"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t("inkl. MwSt","incl. VAT","vÄ. DPH")," · ",n(ae)," ",t("netto","net","netto")]}),H!==0&&e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[H>0?e.jsx(O,{className:"h-3 w-3 text-destructive"}):e.jsx(R,{className:"h-3 w-3 text-green-600"}),e.jsxs("span",{className:`text-xs ${H>0?"text-destructive":"text-green-600"}`,children:[H>0?"+":"",p(H,1),"%"]})]})]})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsxs(y,{className:"font-serif flex items-center gap-2",children:[e.jsx(O,{className:"h-5 w-5 text-orange-500"}),t("Kostenentwicklung","Cost Development","Vývoj nákladů")]}),e.jsx(K,{children:t("Gesamtkosten und Kosten pro m² im Zeitverlauf","Total costs and cost per m² over time","Celkové náklady a náklady na m² v Äase")})]}),e.jsx(b,{children:f.length>0?e.jsx(A,{width:"100%",height:300,children:e.jsxs(M,{data:f,children:[e.jsx(E,{strokeDasharray:"3 3",className:"stroke-muted"}),e.jsx(F,{dataKey:"year",className:"text-xs"}),e.jsx(T,{yAxisId:"left",className:"text-xs",tickFormatter:s=>`â¬${(s/1e3).toFixed(0)}k`}),e.jsx(T,{yAxisId:"right",orientation:"right",className:"text-xs",tickFormatter:s=>`â¬${s}`}),e.jsx($,{content:({active:s,payload:r,label:m})=>{var C;if(!s||!r||r.length===0)return null;const l=(C=r[0])==null?void 0:C.payload;return e.jsxs("div",{className:"bg-background border rounded-lg shadow-lg p-3 text-sm",children:[e.jsx("p",{className:"font-semibold mb-2",children:m}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:t("Gesamtkosten","Total Cost","Celkové náklady")}),e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"font-medium",children:n((l==null?void 0:l.totalCost)||0)}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[n((l==null?void 0:l.totalCostNet)||0)," ",t("netto","net","netto")]})]})]}),e.jsxs("div",{className:"flex justify-between gap-4 border-t pt-1",children:[e.jsx("span",{children:t("Kosten/m²","Cost/m²","Náklady/m²")}),e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"font-medium",children:n((l==null?void 0:l.costPerSqm)||0)}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[n((l==null?void 0:l.costPerSqmNet)||0)," ",t("netto","net","netto")]})]})]})]})]})}}),e.jsx(I,{}),e.jsx(pe,{yAxisId:"left",type:"monotone",dataKey:"totalCost",name:t("Gesamtkosten","Total Cost","Celkové náklady"),fill:"hsl(25 85% 60% / 0.3)",stroke:"hsl(25 85% 60%)",strokeWidth:2}),e.jsx(V,{yAxisId:"right",type:"monotone",dataKey:"costPerSqm",name:t("Kosten/m²","Cost/m²","Náklady/m²"),stroke:"hsl(var(--primary))",strokeWidth:3,dot:{fill:"hsl(var(--primary))"}})]})}):e.jsx("div",{className:"h-[300px] flex items-center justify-center text-muted-foreground",children:t("Keine Daten verfügbar","No data available","Žádná data")})})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsxs(y,{className:"font-serif flex items-center gap-2",children:[e.jsx(se,{className:"h-5 w-5 text-blue-500"}),t("Ãlverbrauch pro m²","Oil Consumption per m²","SpotÅeba oleje na m²")]}),e.jsx(K,{children:t("Verbrauchstrend unabhängig vom Ãlpreis","Consumption trend independent of oil price","Trend spotÅeby nezávislý na cenÄ oleje")})]}),e.jsx(b,{children:Z.length>0?e.jsx(A,{width:"100%",height:300,children:e.jsxs(M,{data:Z,children:[e.jsx(E,{strokeDasharray:"3 3",className:"stroke-muted"}),e.jsx(F,{dataKey:"year",className:"text-xs"}),e.jsx(T,{className:"text-xs",tickFormatter:s=>`${s.toFixed(0)} L`,domain:["auto","auto"]}),e.jsx($,{formatter:(s,r)=>r.includes("Durchschnitt")||r.includes("Average")?[`${p(s,1)} L/m²`,r]:[`${p(s,1)} L/m²`,r]}),e.jsx(I,{}
1),e.jsx(L,{dataKey:"oilPerSqm",name:"L/m²",fill:"hsl(217 91% 60%)",radius:[4,4,0,0]}),e.jsx(V,{type:"monotone",dataKey:"avgOilPerSqm",name:t("Durchschnitt","Average","PrůmÄr"),stroke:"hsl(var(--destructive))",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})}):e.jsx("div",{className:"h-[300px] flex items-center justify-center text-muted-foreground",children:t("Keine Daten verfügbar","No data available","Žádná data")})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsxs(y,{className:"font-serif flex items-center gap-2",children:[e.jsx(ee,{className:"h-5 w-5 text-amber-600"}),t("Ãlverbrauch & Preis","Oil Consumption & Price","SpotÅeba oleje & Cena")]}),e.jsx(K,{children:t("Verbrauch in Litern und Durchschnittspreis","Consumption in liters and average price","SpotÅeba v litrech a průmÄrná cena")})]}),e.jsx(b,{children:f.length>0?e.jsx(A,{width:"100%",height:300,children:e.jsxs(M,{data:f,children:[e.jsx(E,{strokeDasharray:"3 3",className:"stroke-muted"}),e.jsx(F,{dataKey:"year",className:"text-xs"}),e.jsx(T,{yAxisId:"left",className:"text-xs",tickFormatter:s=>`${(s/1e3).toFixed(0)}k L`}),e.jsx(T,{yAxisId:"right",orientation:"right",className:"text-xs",tickFormatter:s=>`â¬${s.toFixed(2)}`}),e.jsx($,{formatter:(s,r)=>r.includes("Preis")||r.includes("Price")||r.includes("Cena")?[`â¬${s.toFixed(3)}`,r]:[`${p(s)} L`,r]}),e.jsx(I,{}),e.jsx(L,{yAxisId:"left",dataKey:"oilConsumption",name:t("Verbrauch (L)","Consumption (L)","SpotÅeba (L)"),fill:"hsl(var(--primary))",radius:[4,4,0,0]}),e.jsx(V,{yAxisId:"right",type:"monotone",dataKey:"oilPrice",name:t("Preis/L","Price/L","Cena/L"),stroke:"hsl(var(--accent))",strokeWidth:3,dot:{fill:"hsl(var(--accent))"}})]})}):e.jsx("div",{className:"h-[300px] flex items-center justify-center text-muted-foreground",children:t("Keine Daten verfügbar","No data available","Žádná data")})})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(y,{className:"font-serif flex items-center gap-2",children:t("Kostenaufschlüsselung","Cost Breakdown","Rozpad nákladů")}),e.jsx(K,{children:t("Ãl, Strom und Wartung nach Jahren","Oil, electricity and maintenance by year","Olej, elektÅina a údržba po letech")})]}),e.jsx(b,{children:Y.length>0?e.jsx(A,{width:"100%",height:300,children:e.jsxs(M,{data:Y,children:[e.jsx(E,{strokeDasharray:"3 3",className:"stroke-muted"}),e.jsx(F,{dataKey:"year",className:"text-xs"}),e.jsx(T,{className:"text-xs",tickFormatter:s=>`â¬${(s/1e3).toFixed(0)}k`}),e.jsx($,{formatter:s=>n(s)}),e.jsx(I,{}),e.jsx(L,{dataKey:"oil",stackId:"a",name:t("Heizöl","Heating Oil","Topný olej"),fill:"hsl(25 85% 60%)",radius:[0,0,0,0]}),e.jsx(L,{dataKey:"electricity",stackId:"a",name:t("Strom","Electricity","ElektÅina"),fill:"hsl(48 96% 53%)"}),e.jsx(L,{dataKey:"maintenance",stackId:"a",name:t("Wartung","Maintenance","Ãdržba"),fill:"hsl(var(--muted-foreground))"}),e.jsx(L,{dataKey:"vat",stackId:"a",name:t("MwSt.","VAT","DPH"),fill:"hsl(142 70% 45%)",radius:[4,4,0,0]}),e.jsx(V,{type:"monotone",dataKey:"total",name:t("Gesamt","Total","Celkem"),stroke:"hsl(var(--primary))",strokeWidth:3,dot:{fill:"hsl(var(--primary))",r:4}})]})}):e.jsx("div",{className:"h-[300px] flex items-center justify-center text-muted-foreground",children:t("Keine Daten verfügbar","No data available","Žádná data")})})]})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(y,{className:"font-serif",children:t("Jährliche Details","Yearly Details","RoÄnà pÅehled")}),e.jsx(K,{children:t("Detaillierte Aufschlüsselung nach Jahr","Detailed breakdown by year","Detailnà rozpad po letech")})]}),e.jsx(b,{children:e.jsx("div",{className:"rounded-md border overflow-x-auto",children:e.jsxs(de,{children:[e.jsx(xe,{children:e.jsxs(X,{children:[e.jsx(_,{children:t("Jahr","Year","Rok")}),e.jsx(_,{className:"text-right",children:e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsxs("span",{className:"flex items-center justify-end gap-1 cursor-help",children:[t("Gesamt","Total","Celkem"),e.jsx(j,{className:"h-3 w-3 text-muted-foreground"})]})}),e.jsx(u,{children:e.jsx("p",{className:"text-xs",children:t("Gesamtkosten inkl. MwSt (Heizöl + Strom + Wartung)","Total costs incl. VAT (Oil + Ele
1ctricity + Maintenance)","Celkové náklady vÄ. DPH (Olej + ElektÅina + Ãdržba)")})})]})})}),e.jsx(_,{className:"text-right",children:e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsxs("span",{className:"flex items-center justify-end gap-1 cursor-help",children:[t("Ãl (L)","Oil (L)","Olej (L)"),e.jsx(j,{className:"h-3 w-3 text-muted-foreground"})]})}),e.jsx(u,{children:e.jsx("p",{className:"text-xs",children:t("Heizölverbrauch in Litern","Heating oil consumption in liters","SpotÅeba topného oleje v litrech")})})]})})}),e.jsx(_,{className:"text-right",children:e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsxs("span",{className:"flex items-center justify-end gap-1 cursor-help",children:["L/m²",e.jsx(j,{className:"h-3 w-3 text-muted-foreground"})]})}),e.jsx(u,{children:e.jsx("p",{className:"text-xs",children:t("Ãlverbrauch pro Quadratmeter beheizter Fläche","Oil consumption per square meter of heated area","SpotÅeba oleje na m² vytápÄné plochy")})})]})})}),e.jsx(_,{className:"text-right",children:e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsxs("span",{className:"flex items-center justify-end gap-1 cursor-help",children:["â¬/L",e.jsx(j,{className:"h-3 w-3 text-muted-foreground"})]})}),e.jsx(u,{children:e.jsx("p",{className:"text-xs",children:t("Durchschnittlicher Einkaufspreis pro Liter Heizöl","Average purchase price per liter of heating oil","PrůmÄrná nákupnà cena za litr oleje")})})]})})}),e.jsx(_,{className:"text-right",children:e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsxs("span",{className:"flex items-center justify-end gap-1 cursor-help",children:[t("Strom","Electricity","ElektÅina"),e.jsx(j,{className:"h-3 w-3 text-muted-foreground"})]})}),e.jsx(u,{children:e.jsx("p",{className:"text-xs",children:t("Stromkosten für Heizungsanlage","Electricity costs for heating system","Náklady na elektÅinu pro topný systém")})})]})})}),e.jsx(_,{className:"text-right",children:e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsxs("span",{className:"flex items-center justify-end gap-1 cursor-help",children:[t("Wartung","Maint.","Ãdržba"),e.jsx(j,{className:"h-3 w-3 text-muted-foreground"})]})}),e.jsx(u,{children:e.jsx("p",{className:"text-xs",children:t("Wartungskosten für Heizungsanlage","Maintenance costs for heating system","Náklady na údržbu topného systému")})})]})})}),e.jsx(_,{className:"text-right",children:e.jsx(d,{children:e.jsxs(x,{children:[e.jsx(h,{asChild:!0,children:e.jsxs("span",{className:"flex items-center justify-end gap-1 cursor-help",children:["â¬/m²",e.jsx(j,{className:"h-3 w-3 text-muted-foreground"})]})}),e.jsx(u,{children:e.jsx("p",{className:"text-xs",children:t("Kosten pro Quadratmeter beheizter Fläche","Cost per square meter of heated area","Náklady na m² vytápÄné plochy")})})]})})})]})}),e.jsx(he,{children:o.sort((s,r)=>r.year-s.year).map(s=>{const r=s.total_heating_area_sqm>0?s.oil_consumption_liters/s.total_heating_area_sqm:0,m=ne(s.notes),l=s.wärmekosten_gross||s.wärmekosten_net*1.2,C=s.cost_per_sqm*1.2;return e.jsxs(X,{children:[e.jsxs(w,{children:[e.jsx("div",{className:"font-medium",children:s.year}),e.jsx("div",{className:"text-xs text-muted-foreground",children:m?`${m.start} â ${m.end}`:`01.01.${s.year} â 31.12.${s.year}`})]}),e.jsxs(w,{className:"text-right",children:[e.jsx("div",{className:"font-bold text-orange-500",children:n(l)}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[n(s.wärmekosten_net)," net"]})]}),e.jsx(w,{className:"text-right font-medium",children:p(s.oil_consumption_liters)}),e.jsx(w,{className:"text-right",children:p(r,1)}),e.jsx(w,{className:"text-right",children:n(s.oil_price_per_liter)}),e.jsx(w,{className:"text-right",children:n(s.electricity_cost)}),e.jsx(w,{className:"text-right",children:n(s.maintenance_cost)}),e.jsxs(w,{className:"text-right",children:[e.jsx(me,{variant:"secondary",className:"font-medium",children:n(C)}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[n(s.cost_per_sqm)," net"]})]})]},s.id)})})]})})})]})]})},ss=()=>{const{user:o}=le(),{language:v}=te(),[a,i]=P.useState([]),[G,S]=P.useState(!0);P.useEffect(()=>{o&&D()},[o]);const D=async()=>{S(!0);const{data:q}=await oe.from("heating_costs").select("*").order("year",{ascending:!0});q&&i(q),S(!1)},k={de:{title:"Heizkosten",description:"Ãbersicht über alle Heizkosten und Verbrauchsdaten",costs:"Kosten"},en:{title:"Heating Costs",description:"Overview of all heating costs and consumption data",costs:"Costs"},cs:{title:"VytápÄnÃ",description:"PÅehled vÅ¡ech nákladů na vytápÄnà a spotÅeby",costs:"Náklady"}},c=k[v]||k.cs;
1return e.jsx(ce,{title:c.title,description:c.description,breadcrumbs:[{label:c.costs,href:"/owners/costs"},{label:c.title}],isLoading:G,onDataRefresh:D,children:e.jsx(fe,{heatingCosts:a})})};export{ss 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.