1import{j as r}from"./router-BbhUQokr.js";import{u as h,a as u,b as j,d as y,e as v,$ as g}from"./index-YHcahCCO.js";import{a as C}from"./bitcoinApi-C08xDOxq.js";import{u as b}from"./useUsdToTryRate-BoJSvJlJ.js";import{a as k,f as N}from"./formatMoney-Bn2D0vJd.js";import{T as P}from"./trending-up-bn72OZ6d.js";import{R as A,A as T,C as K,X as R,Y as w,T as L,d as O,b as a}from"./charts-CMe_y1k7.js";import"./vendor-nUoiNgbM.js";import"./ui-CCI7xipb.js";import"./supabase-KpB3PWUv.js";import"./motion-ChDy0vFR.js";import"./utils-D7W-w1v8.js";import"./CompactLiveBitcoinPrice-B1KRVtx4.js";import"./useNumberCounter-B26ui7Ee.js";const B=({projections:n,currency:M})=>{const{language:l}=h(),t=l==="tr",i=b(),m=n.map(e=>({month:t?`Ay ${e.month}`:`Month ${e.month}`,revenue:e.revenue,costs:e.electricityCost,profit:e.profit,cumulativeProfit:e.cumulativeProfit})),c=e=>t?N(e,{tr:!0,fxRate:i,decimals:0}):C(e,"$",0,"en-US"),d=e=>k(e,{tr:t,fxRate:i}),f=({active:e,payload:s,label:p})=>e&&s&&s.length?r.jsxs("div",{className:"bg-card/95 backdrop-blur-sm border border-border/50 rounded-lg p-3 shadow-lg",children:[r.jsx("p",{className:"font-semibold text-foreground mb-2",children:p}),s.map((o,x)=>r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:o.color}}),r.jsxs("span",{className:"text-muted-foreground",children:[o.name,":"]}),r.jsx("span",{className:"font-medium text-foreground",children:c(o.value)})]},x))]}):null;return r.jsxs(u,{className:"bg-card border-border/50 shadow-sm",children:[r.jsx(j,{className:"pb-4",children:r.jsxs(y,{className:"flex items-center gap-2 text-lg font-semibold",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:r.jsx(P,{className:"w-5 h-5 text-primary"})}
1),t?"12 Aylık Kâr Projeksiyonu":"12-Month Profit Projection"]})}),r.jsx(v,{children:r.jsx("div",{className:"h-[260px] sm:h-[350px]",children:r.jsx(A,{width:"100%",height:"100%",children:r.jsxs(T,{data:m,margin:{top:10,right:10,left:0,bottom:0},children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"colorRevenue",x1:"0",y1:"0",x2:"0",y2:"1",children:[r.jsx("stop",{offset:"5%",stopColor:"hsl(var(--primary))",stopOpacity:.3}),r.jsx("stop",{offset:"95%",stopColor:"hsl(var(--primary))",stopOpacity:0})]}),r.jsxs("linearGradient",{id:"colorProfit",x1:"0",y1:"0",x2:"0",y2:"1",children:[r.jsx("stop",{offset:"5%",stopColor:"hsl(var(--success))",stopOpacity:.3}),r.jsx("stop",{offset:"95%",stopColor:"hsl(var(--success))",stopOpacity:0})]}),r.jsxs("linearGradient",{id:"colorCumulative",x1:"0",y1:"0",x2:"0",y2:"1",children:[r.jsx("stop",{offset:"5%",stopColor:"hsl(var(--chart-3))",stopOpacity:.3}),r.jsx("stop",{offset:"95%",stopColor:"hsl(var(--chart-3))",stopOpacity:0})]})]}),r.jsx(K,{strokeDasharray:"2 4",vertical:!1,stroke:"hsl(var(--border))",strokeOpacity:.5}),r.jsx(R,{dataKey:"month",stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,axisLine:!1}),r.jsx(w,{stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,axisLine:!1,tickFormatter:d}),r.jsx(L,{content:r.jsx(f,{})}),r.jsx(O,{wrapperStyle:g,formatter:e=>r.jsx("span",{className:"text-foreground text-sm",children:e})}),r.jsx(a,{type:"monotone",dataKey:"revenue",name:t?"Gelir":"Revenue",stroke:"hsl(var(--primary))",strokeWidth:1.5,fill:"url(#colorRevenue)"}),r.jsx(a,{type:"monotone",dataKey:"profit",name:t?"Aylık Kâr":"Monthly Profit",stroke:"hsl(var(--success))",strokeWidth:1.5,fill:"url(#colorProfit)"}),r.jsx(a,{type:"monotone",dataKey:"cumulativeProfit",name:t?"Kümülatif Kâr":"Cumulative Profit",stroke:"hsl(var(--chart-3))",strokeWidth:1.5,fill:"url(#colorCumulative)"})]})})})})]})};export{B as MiningProfitChart};
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.