1import{d4 as ct,ax as xt,r,eg as ut,d7 as mt,dA as ht,ey as pt,ez as bt,eN as gt,dY as ft,j as e,b4 as yt,as as p,c as je,a9 as U,t as vt,cf as Ne,cg as we,ch as ke,ci as Ce,cj as m,n as jt,aI as b,ao as _,bi as Nt,bj as wt,bQ as kt,bk as Ct,bl as Ae,ds as At,O as Tt,S as St,d as Te,dt as Se,b as Lt,l as Mt,eS as q,eZ as Le,e_ as It,eY as Et,eW as X,e$ as J,eT as Ft,f0 as Me,eU as Ie,eV as Ee,eX as Z,N as Fe,bu as Ge,b9 as Ve,cd as Gt,f1 as Vt,f2 as Rt,f3 as Pt,ab as Dt,J as Yt,al as Wt,T as Bt,f4 as Ot,f5 as $t,aa as Ht,X as Re,b5 as Kt}from"./index-CpeGhXo5.js";import{u as zt}from"./useCurrencyHelpers-D5hUvgaW.js";import{s as Qt,a as Ut}from"./excelUtils-B6c4w-tr.js";import{g as _t,m as qt,t as Xt}from"./financeMappers-CUv1G2pV.js";import{u as Jt}from"./companySettingsMockApi-D8Uh5efq.js";import{S as Zt}from"./scale-Bjl0IPKl.js";import"./currency-CACMzR5Q.js";function ua(){const x=ct(),S=xt(),{fmtConv:ea,fmtConvCompact:ta,sym:i}=zt(),[g,$]=r.useState("statement"),[d,Pe]=r.useState("All Companies"),[aa,sa]=r.useState(new Date().getFullYear()),[De,L]=r.useState(!1),[M,ee]=r.useState("Asset"),[Ye,G]=r.useState(!1),[u,N]=r.useState({name:"",category:"Real Estate & Land",value:""}),[o,f]=r.useState({title:"",category:"Education",targetYear:2030,targetAmount:"",currentSaved:"",notes:""}),{data:te,isLoading:We,refetch:Be}=ut({limit:2e3}),{data:ae,isLoading:Oe,refetch:$e}=mt({limit:2e3}),{data:se,isLoading:He,refetch:Ke}=ht({limit:2e3}),{data:re,isLoading:ze,refetch:Qe}=pt({limit:500}),{data:le,isLoading:Ue,refetch:_e}=bt({limit:500}),{data:ne,isLoading:qe,refetch:Xe}=gt({limit:500}),{data:oe=[]}=ft(),{data:de=[]}=Jt(),Je=We||Oe||He||ze||Ue||qe,Ze=r.useMemo(()=>{const t=["All Companies"],a=new Set;return oe.forEach(s=>{s.name&&!a.has(s.name)&&(t.push(s.name),a.add(s.name))}),de.forEach(s=>{s.name&&!a.has(s.name)&&(t.push(s.name),a.add(s.name))}),a.has("Tekki Web Solutions Pvt. Ltd.")||t.push("Tekki Web Solutions Pvt. Ltd."),t},[oe,de]),ie=r.useMemo(()=>{const t=(te?.items??[]).map(_t);return d==="All Companies"?t:t.filter(a=>a.client===d||a.project?.toLowerCase().includes(d.toLowerCase()))},[te,d]),ce=r.useMemo(()=>{const t=(ae?.items??[]).map(qt);return d==="All Companies"?t:t.filter(a=>a.company===d)},[ae,d]),V=r.useMemo(()=>(se?.items??[]).map(Xt),[se]),xe=r.useMemo(()=>re?.items??[],[re]),ue=r.useMemo(()=>le?.items??[],[le]),me=r.useMemo(()=>ne?.items??[],[ne]),et=r.useMemo(()=>V.reduce((t,a)=>t+(a.receipt||0),0),[V]),tt=r.useMemo(()=>V.reduce((t,a)=>t+(a.payment||0),0),[V]),H=Math.max(0,et-tt),I=r.useMemo(()=>xe.reduce((t,a)=>t+(a.balance||0),0),[xe]),y=r.useMemo(()=>ie.reduce((t,a)=>t+(a.outstanding||0),0),[ie]),v=r.useMemo(()=>ce.reduce((t,a)=>t+(a.amount||0),0),[ce]),E=r.useMemo(()=>ue.reduce((t,a)=>t+(a.cost||a.currentValue||0),0),[ue]),F=r.useMemo(()=>me.reduce((t,a)=>t+(a.currentValue||a.amount||0),0),[me]),K=Math.max(0,(y>0?y:185e4)-(v>0?v:28e4)),R=r.useMemo(()=>d==="All Companies"?1:d.includes("Tekki Web")?.75:.45,[d]),P=r.useMemo(()=>({"nw-cash":`${x}/cash-book`,"nw-bank":`${x}/bank-accounts`,"nw-receivables":`${x}/invoices`,"nw-systems":`${x}/fixed-assets`,"nw-investments":`${x}/investments`,"nw-realestate":`${x}/real-estate`,"nw-gadgets":`${x}/personal-gadgets`,"nw-retained-profit":`${x}/profit-loss`,"nw-payables":`${x}/expenses`,"nw-bank-loan":`${x}/liabilities`,"nw-gst-tax":`${x}/liabilities`}),[x]),[D,Y]=r.useState([{id:"nw-cash",name:"Cash in Vault & Petty Cash",category:"Cash & Bank",type:"Asset",source:"Cash Book",dynamicValue:15e4+H},{id:"nw-bank",name:"Commercial Bank Balances (HDFC & ICICI)",category:"Cash & Bank",type:"Asset",source:"Bank Accounts",dynamicValue:I>0?I:145e4},{id:"nw-receivables",name:"Accounts Receivable (Client Pending Invoices)",category:"Receivables",type:"Asset",source:"Invoices",dynamicValue:y>0?y:48e4},{id:"nw-retained-profit",name:"Company YTD Net Profit (P&L Retained Net Income)",category:"Investments",type:"Asset",source:"Manual Entry",dynamicValue:K},{id:"nw-systems",name:"High-End Developer IT Systems & Workstations",category:"Fixed Assets",type:"Asset",source:"Fixed Assets",dynamicValue:E>0?E:97e4},{id:"nw-investments",name:"Mutual Funds, Stocks & Treasury Securities",category:"Investments",type:"Asset",source:"Investments",dynamicValue:F>0?F:65e4},{id:"nw-generators",name:"Commercial Heavy Generators & Solar Power Backup",category:"Generators & Power",type:"Asset",source:"Manual Entry",dynamicValue:42e4},{id:"nw-realestate",name:"Office Premises & Plot Land Assets",category:"Real Estate & Land",type:"Asset",source:"Manual Entry",dynamicValue:35e5},{id:"nw-vehicles",name:"Company Executive Vehicles & Cars",category:"Vehicles & Fleet",type:"Asset",source:"Manual Entry",dynamicValue:185e4},{id:"nw-gold",name:"Gold Coins & Treasury Reserve Bullion",category:"Gold & Treasury",type:"Asset",source:"Manual Entry",dynamicValue:8e5},{id:"nw-gadgets",name:"Personal Gadgets & Tech Gear (iPhones, MacBooks, Cameras)",category:"Fixed Assets",type:"Asset",source:"Manual Entry",dynamicValue:857e3},{id:"nw-payables",name:"Accounts Payable & Vendor Bills",category:"Current Liability",type:"Liability",source:"Expenses",dynamicValue:v>0?v:28e4},{id:"nw-gst-tax",name:"GST & Tax Statutory Duties Accrued",category:"Current Liability",type:"Liability",source:"Manual Entry",dynamicValue:168e3}
1,{id:"nw-bank-loan",name:"HDFC Term Loan & Business Credit Facility",category:"Loans & Debt",type:"Liability",source:"Manual Entry",dynamicValue:45e4}]),[w,k]=r.useState([{year:2026,targetNetWorth:1e7,realEstateTarget:4e6,systemsAndHardwareTarget:15e5,generatorsAndPowerTarget:5e5,vehiclesTarget:2e6,goldAndTreasuryTarget:1e6},{year:2027,targetNetWorth:15e6,realEstateTarget:65e5,systemsAndHardwareTarget:22e5,generatorsAndPowerTarget:75e4,vehiclesTarget:25e5,goldAndTreasuryTarget:15e5},{year:2028,targetNetWorth:22e6,realEstateTarget:1e7,systemsAndHardwareTarget:3e6,generatorsAndPowerTarget:1e6,vehiclesTarget:35e5,goldAndTreasuryTarget:22e5},{year:2029,targetNetWorth:32e6,realEstateTarget:15e6,systemsAndHardwareTarget:4e6,generatorsAndPowerTarget:125e4,vehiclesTarget:45e5,goldAndTreasuryTarget:32e5},{year:2030,targetNetWorth:5e7,realEstateTarget:25e6,systemsAndHardwareTarget:6e6,generatorsAndPowerTarget:15e5,vehiclesTarget:6e6,goldAndTreasuryTarget:5e6}]),[C,he]=r.useState([{id:"lg-1",title:"Kids' Overseas Higher Education & College Fund",category:"Education",targetYear:2032,targetAmount:75e5,currentSaved:22e5,notes:"Target fund for ivy league/overseas engineering & business master's degree",icon:"GraduationCap"},{id:"lg-2",title:"Kids' Wedding & Destination Marriage Fund",category:"Marriage",targetYear:2036,targetAmount:5e6,currentSaved:12e5,notes:"Earmarked wedding ceremony, jewelry, and celebration corpus",icon:"Heart"},{id:"lg-3",title:"Family World Tour & International Vacations",category:"Travel",targetYear:2028,targetAmount:15e5,currentSaved:65e4,notes:"Annual luxury family holiday fund for Europe & Asia trips",icon:"Plane"},{id:"lg-4",title:"Post-Retirement Pension & Financial Freedom Fund",category:"Retirement",targetYear:2040,targetAmount:21e6,currentSaved:45e5,notes:"Passive monthly income corpus to sustain lifestyle post-retirement",icon:"Sun"}]),pe=(t,a)=>{const s=parseFloat(a);Y(n=>n.map(l=>l.id===t?{...l,overrideValue:isNaN(s)?null:s}:l))},be=t=>{Y(a=>a.map(s=>s.id===t?{...s,overrideValue:null}:s)),b.success("Reset value to dynamic live balance")},ge=t=>{Y(a=>a.filter(s=>s.id!==t)),b.success("Item removed")},at=t=>{if(t.preventDefault(),!u.name.trim())return b.error("Enter item name");const a=parseFloat(u.value)||0,s={id:`custom-${Date.now()}`,name:u.name.trim(),category:u.category,type:M,source:"Manual Entry",dynamicValue:a,overrideValue:a,isCustom:!0};Y(n=>[...n,s]),L(!1),N({name:"",category:"Real Estate & Land",value:""}),b.success(`Added ${M}: ${s.name}`)},fe=(t,a,s)=>{const n=parseFloat(s)||0;he(l=>l.map(j=>j.id===t?{...j,[a]:n}:j))},st=t=>{if(t.preventDefault(),!o.title.trim())return b.error("Enter goal title");const a=parseFloat(o.targetAmount)||0,s=parseFloat(o.currentSaved)||0,n={Education:"GraduationCap",Marriage:"Heart",Travel:"Plane",Retirement:"Sun",Custom:"Target"},l={id:`lg-${Date.now()}`,title:o.title.trim(),category:o.category,targetYear:Number(o.targetYear)||2030,targetAmount:a,currentSaved:s,notes:o.notes,icon:n[o.category]};he(j=>[...j,l]),G(!1),f({title:"",category:"Education",targetYear:2030,targetAmount:"",currentSaved:"",notes:""}),b.success(`Added Life Goal: ${l.title}`)},ye=t=>t.id==="nw-cash"?15e4+H:t.id==="nw-bank"?I>0?I:145e4:t.id==="nw-receivables"?y>0?y:48e4:t.id==="nw-retained-profit"?K:t.id==="nw-systems"?E>0?E:97e4:t.id==="nw-investments"?F>0?F:65e4:t.id==="nw-payables"?v>0?v:28e4:t.dynamicValue,A=r.useMemo(()=>D.filter(t=>t.type==="Asset").map(t=>{const a=ye(t),s=t.overrideValue!==void 0&&t.overrideValue!==null?t.overrideValue:a;return{...t,effectiveValue:Math.round(s*R)}}),[D,R,H,I,y,K,E,F]),W=r.useMemo(()=>D.filter(t=>t.type==="Liability").map(t=>{const a=ye(t),s=t.overrideValue!==void 0&&t.overrideValue!==null?t.overrideValue:a;return{...t,effectiveValue:Math.round(s*R)}}),[D,R,v]),c=r.useMemo(()=>A.reduce((t,a)=>t+a.effectiveValue,0),[A]),h=r.useMemo(()=>W.reduce((t,a)=>t+a.effectiveValue,0),[W]),T=c-h,rt=c>0?T/c*100:0,B=r.useMemo(()=>w.find(t=>t.year===2030)||w[4],[w]).targetNetWorth,lt=r.useMemo(()=>w.map((t,a)=>{const s=(a+1)/5,n=Math.round(T+(B-T)*s*.85),l=Math.max(0,t.targetNetWorth-n);return{year:`FY ${t.year}`,target:t.targetNetWorth,projected:n,gap:l,realEstate:t.realEstateTarget,systems:t.systemsAndHardwareTarget,generators:t.generatorsAndPowerTarget,vehicles:t.vehiclesTarget,gold:t.goldAndTreasuryTarget}}),[w,T,B]),O=r.useMemo(()=>C.reduce((t,a)=>t+a.targetAmount,0),[C]),z=r.useMemo(()=>C.reduce((t,a)=>t+a.currentSaved,0),[C]),nt=Math.max(0,O-z),ot=O>0?z/O*100:0,ve=r.useMemo(()=>{const t={"Cash & Bank":"#10b981",Receivables:"#3b82f6","Fixed Assets":"#8b5cf6",Investments:"#ec4899","Real Estate & Land":"#06b6d4","Generators & Power":"#f59e0b","Vehicles & Fleet":"#6366f1","Gold & Treasury":"#eab308"};return A.filter(a=>a.effectiveValue>0).map(a=>({name:a.name,value:a.effectiveValue,category:a.category,color:t[a.category]||"#64748b",route:P[a.id]}))},[A,P]),dt=r.useMemo(()=>[{category:"Cash & Bank",Assets:Math.max(0,Math.round(c*.22)),Liabilities:Math.max(0,Math.round(h*.35))},{category:"Fixed & IT Gear",Assets:Math.max(0,Math.round(c*.18)),Liabilities:0},{category:"Real Estate & Land",Assets:Math.max(0,Math.round(c*.35)),Liabilities:Math.max(0,Math.round(h*.5))},{category:"Investments & Gold",Assets:Math.max(0,Math.round(c*.15)),Liabilities:0},{category:"Personal Belongings",Assets:Math.max(0,Math.round(c*.1)),Liabilities:Math.max(0,Math.round(h*.15))}],[c,h]),it=()=>{const t=[...A.map(a=>({Type:"ASSET","Company Filter":d,Category:a.category,"Item Description":a.name,"Value (â¹)":a.effectiveValue})),{Type:"TOTAL","Company Filter":d,Category:"ASSETS","Item Description":"TOTAL ASSETS","Value (â¹)":c},...W.map(a=>({Type:"LIABILITY","Company Filter":d,Category:a.category,"Item Description":a.name,"Value (â¹)":a.effectiveValue})),{Type:"TOTAL","Company Filter":d,Category:"LIABILITIES","Item Description":"TOTAL LIABILITIES","Value (â¹)":h},{Type:"NET WORTH","Company Filter":d,Category:"SUMMARY","Item Description":"ACTUAL NET WORTH","Value (â¹)":T},...C.map(a=>({Type:"LIFE GOAL","Company Filter":"Personal & Family",Category:a.category,"Item Description":a.title,"Target Year":a.targetYear,"Target (â¹)":a.targetAmount,"Saved (â¹)":a.currentSaved}))];Qt("Net_Worth_and_Life_Goals_Report",a=>Ut(a,"Net Worth & Life Goals",t)),b.success("Exported Net Worth & Life Goals to Excel!")};return e.jsxs("div",{className:"flex flex-col flex-1 h-full overflow-y-auto custom-scrollbar bg-slate-50/50 dark:bg-slate-950/50 pb-16",children:[e.jsx(yt,{title:"Net Worth & Life Goals Analytics Dashboard",subtitle:"Company asset position, 5-year target growth charts, and family life goals planning",accentVar:"--mod-finance",showMonthYearFilter:!1}),e.jsxs("div",{className:"shrink-0 bg-surface/50 border-b border-slate-200 dark:border-slate-800 px-3 py-1.5 flex items-center justify-between flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-slate-100 dar
1k:bg-slate-800/80 p-1 rounded-lg",children:[e.jsxs("button",{type:"button",onClick:()=>$("statement"),className:p("px-3 py-1 text-xs font-semibold rounded-md transition-all flex items-center gap-1.5",g==="statement"?"bg-white dark:bg-slate-900 text-blue-600 dark:text-blue-400 shadow-2xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900"),children:[e.jsx(Zt,{className:"w-3.5 h-3.5"})," Company Assets & Net Worth"]}),e.jsxs("button",{type:"button",onClick:()=>$("analytics"),className:p("px-3 py-1 text-xs font-semibold rounded-md transition-all flex items-center gap-1.5",g==="analytics"?"bg-white dark:bg-slate-900 text-purple-600 dark:text-purple-400 shadow-2xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900"),children:[e.jsx(je,{className:"w-3.5 h-3.5"})," 5-Year Growth Charts & Gap Analysis"]}),e.jsxs("button",{type:"button",onClick:()=>$("lifegoals"),className:p("px-3 py-1 text-xs font-semibold rounded-md transition-all flex items-center gap-1.5",g==="lifegoals"?"bg-white dark:bg-slate-900 text-emerald-600 dark:text-emerald-400 shadow-2xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900"),children:[e.jsx(U,{className:"w-3.5 h-3.5"})," Life Goals & Retirement Funds"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(vt,{className:"w-3.5 h-3.5 text-slate-400"}),e.jsxs(Ne,{value:d,onValueChange:Pe,children:[e.jsx(we,{className:"w-[200px] h-8 text-xs font-semibold bg-white dark:bg-slate-900 border-slate-200 dark:border-slate-800 shadow-2xs",children:e.jsx(ke,{placeholder:"Select Company"})}),e.jsx(Ce,{children:Ze.map(t=>e.jsx(m,{value:t,className:"text-xs font-medium",children:t},t))})]})]}),e.jsx("button",{type:"button",onClick:()=>{Be(),$e(),Ke(),Qe(),_e(),Xe(),b.success("Refreshed live company balances")},className:"h-8 p-2 rounded-md border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 hover:bg-slate-50 text-slate-600 dark:text-slate-300 shadow-2xs",title:"Refresh All Data",children:e.jsx(jt,{className:p("w-3.5 h-3.5",Je&&"animate-spin")})}),g==="lifegoals"&&e.jsxs("button",{type:"button",onClick:()=>{G(!0)},className:"h-8 px-3 rounded-lg bg-emerald-600 hover:bg-emerald-700 text-white font-semibold text-xs inline-flex items-center gap-1.5 shadow-xs transition-colors shrink-0 whitespace-nowrap",children:[e.jsx(_,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Add Life Goal"})]}),e.jsxs(Nt,{children:[e.jsxs(wt,{className:"h-8 px-3 rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs inline-flex items-center gap-1.5 shadow-xs outline-none transition-colors shrink-0 whitespace-nowrap",children:[e.jsx(kt,{className:"w-3.5 h-3.5"})," Export Report"]}),e.jsxs(Ct,{align:"end",className:"w-44",children:[e.jsxs(Ae,{onClick:it,className:"text-xs gap-2 cursor-pointer",children:[e.jsx(At,{className:"w-3.5 h-3.5 text-emerald-600"})," Export Excel (.xlsx)"]}),e.jsxs(Ae,{onClick:()=>window.print(),className:"text-xs gap-2 cursor-pointer",children:[e.jsx(Tt,{className:"w-3.5 h-3.5 text-blue-600"})," Print / Export PDF"]})]})]})]})]}),g==="statement"&&e.jsxs("div",{className:"p-3 space-y-3",children:[e.jsxs("div",{className:"shrink-0 grid grid-cols-2 lg:grid-cols-4 gap-2 text-xs",children:[e.jsxs("div",{className:"p-3 bg-gradient-to-r from-blue-600 to-indigo-700 text-white rounded-xl shadow-xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-blue-100 tracking-wide block",children:d==="All Companies"?"Consolidated Net Worth":`${d} Net Worth`}),e.jsxs("span",{className:"text-base font-black font-data block mt-0.5",children:[i," ",T.toLocaleString("en-IN")]})]}),e.jsx(St,{className:"w-5 h-5 text-blue-200 shrink-0"})]}),e.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800 shadow-2xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-emerald-600 dark:text-emerald-400 tracking-wide block",children:"Total Company Assets"}),e.jsxs("span",{className:"text-base font-bold text-slate-800 dark:text-slate-200 font-data block mt-0.5",children:[i," ",c.toLocaleStr
1ing("en-IN")]})]}),e.jsx(Te,{className:"w-4 h-4 text-emerald-500 shrink-0"})]}),e.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800 shadow-2xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-rose-600 dark:text-rose-400 tracking-wide block",children:"Total Liabilities"}),e.jsxs("span",{className:"text-base font-bold text-slate-800 dark:text-slate-200 font-data block mt-0.5",children:[i," ",h.toLocaleString("en-IN")]})]}),e.jsx(Se,{className:"w-4 h-4 text-rose-500 shrink-0"})]}),e.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800 shadow-2xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-purple-600 dark:text-purple-400 tracking-wide block",children:"Solvency Cushion"}),e.jsxs("span",{className:"text-base font-bold text-purple-600 dark:text-purple-400 font-data block mt-0.5",children:[rt.toFixed(1),"% Solvent"]})]}),e.jsx(Lt,{className:"w-4 h-4 text-purple-500 shrink-0"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"p-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl shadow-xs space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Mt,{className:"w-4 h-4 text-blue-600"}),e.jsx("h3",{className:"text-xs font-bold text-slate-900 dark:text-slate-100 uppercase tracking-wide",children:"Asset Portfolio Allocation & Composition"})]}),e.jsx("span",{className:"text-[10px] text-slate-400",children:"Click slice for deep analysis â"})]}),e.jsx("div",{className:"h-[230px] w-full min-h-[230px]",children:e.jsx(q,{width:"100%",height:230,children:e.jsxs(Le,{children:[e.jsx(It,{data:ve,cx:"50%",cy:"50%",innerRadius:55,outerRadius:85,paddingAngle:3,dataKey:"value",onClick:t=>t.route&&S(t.route),className:"cursor-pointer",children:ve.map((t,a)=>e.jsx(Et,{fill:t.color},`cell-${a}`))}),e.jsx(X,{formatter:t=>[`â¹ ${Number(t).toLocaleString("en-IN")}`,"Valuation"]}),e.jsx(J,{wrapperStyle:{fontSize:"10px"}})]})})})]}),e.jsxs("div",{className:"p-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl shadow-xs space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{className:"w-4 h-4 text-purple-600"}),e.jsx("h3",{className:"text-xs font-bold text-slate-900 dark:text-slate-100 uppercase tracking-wide",children:"Category Solvency (Assets vs. Liabilities)"})]}),e.jsx("span",{className:"text-[10px] text-slate-400",children:"Leverage Ratio"})]}),e.jsx("div",{className:"h-[230px] w-full min-h-[230px]",children:e.jsx(q,{width:"100%",height:230,children:e.jsxs(Ft,{data:dt,margin:{top:10,right:10,left:10,bottom:0},children:[e.jsx(Me,{strokeDasharray:"3 3",vertical:!1,opacity:.3}),e.jsx(Ie,{dataKey:"category",tick:{fontSize:10}}),e.jsx(Ee,{tickFormatter:t=>`â¹ ${(t/1e5).toFixed(0)}L`,tick:{fontSize:10}}),e.jsx(X,{formatter:t=>[`â¹ ${Number(t).toLocaleString("en-IN")}`,""]}),e.jsx(J,{wrapperStyle:{fontSize:"10px"}}),e.jsx(Z,{dataKey:"Assets",fill:"#10b981",radius:[4,4,0,0]}),e.jsx(Z,{dataKey:"Liabilities",fill:"#f43f5e",radius:[4,4,0,0]})]})})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3 flex-1 min-h-[420px]",children:[e.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl overflow-hidden shadow-xs flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"px-3.5 py-2.5 border-b border-slate-200 dark:border-slate-800 bg-emerald-50/60 dark:bg-emerald-950/30 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Te,{className:"w-4 h-4 text-emerald-600"}),e.jsx("h3",{className:"text-xs font-bold text-emerald-900 dark:text-emerald-200 uppercase tracking-wide",children:"ASSETS BREAKDOWN"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>{ee("Asset"),N({name:"",category:"Real Estate & Land",value:""}),L(!0)},className:"h-7 px-3 rounded-md bg-emerald-600 hover:bg-emerald-700 text-white font-semibold text-xs inline-flex items-center gap-1 shadow-2xs transition-colors shrink-0 whitespace-nowrap",children:[e.jsx(_,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Add Asset"})]}),e.jsxs("span",{className:"text-xs font-bold font-data text-emerald-700 dark:text-emerald-400 pl-1 border-l border-emerald-200 dark:border-emerald-800",children:[i," ",c.toLocaleStr
1ing("en-IN")]})]})]}),e.jsx("div",{className:"divide-y divide-slate-100 dark:divide-slate-800 text-xs",children:A.map(t=>{const a=t.overrideValue!==void 0&&t.overrideValue!==null,s=P[t.id];return e.jsxs("div",{className:"px-3.5 py-2.5 flex items-center justify-between hover:bg-slate-50/70 dark:hover:bg-slate-800/40 transition-colors",children:[e.jsxs("div",{className:"truncate pr-2 flex-1",children:[e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx("p",{onClick:()=>s&&S(s),className:p("font-semibold text-slate-800 dark:text-slate-200 truncate",s&&"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 hover:underline"),title:s?"Click to view granular asset details":void 0,children:t.name})}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsxs("span",{className:"text-[10px] text-slate-400",children:["Category: ",e.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-medium",children:t.category})]}),s&&e.jsxs("button",{type:"button",onClick:()=>S(s),className:"text-[10px] font-bold text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-0.5",children:["View Details ",e.jsx(Fe,{className:"w-2.5 h-2.5"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("span",{className:"absolute left-2.5 text-xs text-slate-400 font-data",children:i}),e.jsx("input",{type:"number",value:t.effectiveValue,onChange:n=>pe(t.id,n.target.value),className:p("w-32 h-7 pl-6 pr-2 text-right text-xs font-data font-bold rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 focus:outline-none focus:border-blue-500 transition-all",a&&"border-amber-400 text-amber-700 bg-amber-50/30 font-black")})]}),a&&e.jsx("button",{type:"button",onClick:()=>be(t.id),className:"p-1 text-slate-400 hover:text-blue-600",title:"Reset to dynamic",children:e.jsx(Ge,{className:"w-3.5 h-3.5"})}),t.isCustom&&e.jsx("button",{type:"button",onClick:()=>ge(t.id),className:"p-1 text-red-400 hover:text-red-600",title:"Delete",children:e.jsx(Ve,{className:"w-3.5 h-3.5"})})]})]},t.id)})})]}),e.jsxs("div",{className:"px-3.5 py-2.5 bg-slate-900 text-white flex items-center justify-between font-bold text-xs rounded-b-xl",children:[e.jsx("span",{children:"TOTAL COMPANY ASSETS"}),e.jsxs("span",{className:"font-data text-emerald-400 text-sm",children:[i," ",c.toLocaleString("en-IN")]})]})]}),e.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl overflow-hidden shadow-xs flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"px-3.5 py-2.5 border-b border-slate-200 dark:border-slate-800 bg-rose-50/60 dark:bg-rose-950/30 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4 text-rose-600"}),e.jsx("h3",{className:"text-xs font-bold text-rose-900 dark:text-rose-200 uppercase tracking-wide",children:"LIABILITIES BREAKDOWN"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>{ee("Liability"),N({name:"",category:"Current Liability",value:""}),L(!0)},className:"h-7 px-3 rounded-md bg-rose-600 hover:bg-rose-700 text-white font-semibold text-xs inline-flex items-center gap-1 shadow-2xs transition-colors shrink-0 whitespace-nowrap",children:[e.jsx(_,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Add Liability"})]}),e.jsxs("span",{className:"text-xs font-bold font-data text-rose-700 dark:text-rose-400 pl-1 border-l border-rose-200 dark:border-rose-800",children:[i," ",h.toLocaleString("en-IN")]})]})]}),e.jsx("div",{className:"divide-y divide-slate-100 dark:divide-slate-800 text-xs",children:W.map(t=>{const a=t.overrideValue!==void 0&&t.overrideValue!==null,s=P[t.id];return e.jsxs("div",{className:"px-3.5 py-2.5 flex items-center justify-between hover:bg-slate-50/70 dark:hover:bg-slate-800/40 transition-colors",children:[e.jsxs("div",{className:"truncate pr-2 flex-1",children:[e.jsx("p",{onClick:()=>s&&S(s),className:p("font-semibold text-slate-800 dark:text-slate-200 truncate",s&&"cursor-pointer hover:text-blue-600 dar
1k:hover:text-blue-400 hover:underline"),title:s?"Click to view granular liability details":void 0,children:t.name}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsxs("span",{className:"text-[10px] text-slate-400",children:["Category: ",e.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-medium",children:t.category})]}),s&&e.jsxs("button",{type:"button",onClick:()=>S(s),className:"text-[10px] font-bold text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-0.5",children:["View Details ",e.jsx(Fe,{className:"w-2.5 h-2.5"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("span",{className:"absolute left-2.5 text-xs text-slate-400 font-data",children:i}),e.jsx("input",{type:"number",value:t.effectiveValue,onChange:n=>pe(t.id,n.target.value),className:p("w-32 h-7 pl-6 pr-2 text-right text-xs font-data font-bold rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 focus:outline-none focus:border-blue-500 transition-all",a&&"border-amber-400 text-amber-700 bg-amber-50/30 font-black")})]}),a&&e.jsx("button",{type:"button",onClick:()=>be(t.id),className:"p-1 text-slate-400 hover:text-blue-600",title:"Reset to dynamic",children:e.jsx(Ge,{className:"w-3.5 h-3.5"})}),t.isCustom&&e.jsx("button",{type:"button",onClick:()=>ge(t.id),className:"p-1 text-red-400 hover:text-red-600",title:"Delete",children:e.jsx(Ve,{className:"w-3.5 h-3.5"})})]})]},t.id)})})]}),e.jsxs("div",{className:"px-3.5 py-2.5 bg-slate-900 text-white flex items-center justify-between font-bold text-xs rounded-b-xl",children:[e.jsx("span",{children:"TOTAL COMPANY LIABILITIES"}),e.jsxs("span",{className:"font-data text-rose-400 text-sm",children:[i," ",h.toLocaleString("en-IN")]})]})]})]})]}),g==="analytics"&&e.jsxs("div",{className:"p-3 space-y-4",children:[e.jsxs("div",{className:"p-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl shadow-xs space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Gt,{className:"w-5 h-5 text-blue-600"}),e.jsx("h3",{className:"text-sm font-bold text-slate-900 dark:text-slate-100",children:"5-Year Net Worth Growth Trajectory & Target Gap Analytics (FY2026 â FY2030)"})]}),e.jsxs("span",{className:"px-3 py-1 rounded-full text-xs font-bold bg-purple-50 text-purple-700 dark:bg-purple-950/60 dark:text-purple-300 border border-purple-200",children:["FY2030 TARGET GOAL: ",i," ",(B/1e7).toFixed(2)," Cr (",i," ",(B/1e5).toFixed(0)," Lakhs)"]})]}),e.jsx("div",{className:"h-64 w-full",children:e.jsx(q,{width:"100%",height:"100%",children:e.jsxs(Vt,{data:lt,margin:{top:10,right:20,left:10,bottom:0},children:[e.jsx(Me,{strokeDasharray:"3 3",vertical:!1,opacity:.3}),e.jsx(Ie,{dataKey:"year",tick:{fontSize:11}}),e.jsx(Ee,{tickFormatter:t=>`â¹ ${(t/1e5).toFixed(0)}L`,tick:{fontSize:11}}),e.jsx(X,{formatter:t=>[`â¹ ${Number(t).toLocaleString("en-IN")}`,""]}),e.jsx(J,{wrapperStyle:{fontSize:11}}),e.jsx(Rt,{type:"monotone",dataKey:"projected",name:"Projected Actual Net Worth",fill:"#3b82f6",fillOpacity:.15,stroke:"#3b82f6",strokeWidth:2}),e.jsx(Pt,{type:"monotone",dataKey:"target",name:"Target Net Worth Trajectory",stroke:"#8b5cf6",strokeWidth:3,dot:{r:4}}),e.jsx(Z,{dataKey:"gap",name:"Target Shortfall / Gap",fill:"#f59e0b",radius:[4,4,0,0]})]})})})]}),e.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl overflow-hidden shadow-xs",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-800/40 flex items-center justify-between",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-900 dark:text-slate-100 uppercase tracking-wider flex items-center gap-2",children:[e.jsx(Dt,{className:"w-4 h-4 text-purple-600"})," FY2026 â FY2030 Year-by-Year Asset Target Matrix"]}),e.jsx("p",{className:"text-[11px] text-slate-500",children:"Edit asset targets per year to see live chart recalculations"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"bg-slate-100 dar
1k:bg-slate-800/80 border-b border-slate-200 dark:border-slate-800 text-[11px] uppercase tracking-wider text-slate-600 dark:text-slate-300 font-bold",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left",children:"Financial Year"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Target Net Worth (â¹)"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"ð¢ Real Estate & Land (â¹)"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"â¡ Generators & Power (â¹)"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"ð» Systems & IT Gear (â¹)"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"ð Vehicles & Cars (â¹)"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"ðª Gold & Treasury (â¹)"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-800 font-data",children:w.map(t=>e.jsxs("tr",{className:"hover:bg-slate-50/70 dark:hover:bg-slate-800/40",children:[e.jsxs("td",{className:"px-3 py-2 font-bold text-slate-800 dark:text-slate-200",children:["FY ",t.year,"â",String(t.year+1).slice(2)]}),e.jsx("td",{className:"px-3 py-2 text-right",children:e.jsx("input",{type:"number",value:t.targetNetWorth,onChange:a=>{const s=parseFloat(a.target.value)||0;k(n=>n.map(l=>l.year===t.year?{...l,targetNetWorth:s}:l))},className:"w-32 h-7 px-2 text-right font-bold text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-blue-600 focus:outline-none focus:ring-1 focus:ring-blue-500"})}),e.jsx("td",{className:"px-3 py-2 text-right",children:e.jsx("input",{type:"number",value:t.realEstateTarget,onChange:a=>{const s=parseFloat(a.target.value)||0;k(n=>n.map(l=>l.year===t.year?{...l,realEstateTarget:s}:l))},className:"w-28 h-7 px-2 text-right text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 focus:outline-none focus:ring-1 focus:ring-blue-500"})}),e.jsx("td",{className:"px-3 py-2 text-right",children:e.jsx("input",{type:"number",value:t.generatorsAndPowerTarget,onChange:a=>{const s=parseFloat(a.target.value)||0;k(n=>n.map(l=>l.year===t.year?{...l,generatorsAndPowerTarget:s}:l))},className:"w-28 h-7 px-2 text-right text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 focus:outline-none focus:ring-1 focus:ring-blue-500"})}),e.jsx("td",{className:"px-3 py-2 text-right",children:e.jsx("input",{type:"number",value:t.systemsAndHardwareTarget,onChange:a=>{const s=parseFloat(a.target.value)||0;k(n=>n.map(l=>l.year===t.year?{...l,systemsAndHardwareTarget:s}:l))},className:"w-28 h-7 px-2 text-right text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 focus:outline-none focus:ring-1 focus:ring-blue-500"})}),e.jsx("td",{className:"px-3 py-2 text-right",children:e.jsx("input",{type:"number",value:t.vehiclesTarget,onChange:a=>{const s=parseFloat(a.target.value)||0;k(n=>n.map(l=>l.year===t.year?{...l,vehiclesTarget:s}:l))},className:"w-28 h-7 px-2 text-right text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 focus:outline-none focus:ring-1 focus:ring-blue-500"})}),e.jsx("td",{className:"px-3 py-2 text-right",children:e.jsx("input",{type:"number",value:t.goldAndTreasuryTarget,onChange:a=>{const s=parseFloat(a.target.value)||0;k(n=>n.map(l=>l.year===t.year?{...l,goldAndTreasuryTarget:s}:l))},className:"w-28 h-7 px-2 text-right text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 focus:outline-none focus:ring-1 focus:ring-blue-500"})})]},t.year))})]})})]})]}),g==="lifegoals"&&e.jsxs("div",{className:"p-3 space-y-4",children:[e.jsxs("div",{className:"shrink-0 grid grid-cols-2 lg:grid-cols-4 gap-2 text-xs",children:[e.jsxs("div",{className:"p-3 bg-gradient-to-r from-emerald-600 to-teal-700 text-white rounded-xl shadow-xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-emerald-100 tracking-wide block",children:"Total Goals Corpus Needed"}),e.jsxs("span",{className:"text-base font-black font-data block mt-0.5",children:[i," ",O.toLocaleStr
1ing("en-IN")]})]}),e.jsx(U,{className:"w-5 h-5 text-emerald-200 shrink-0"})]}),e.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800 shadow-2xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-emerald-600 dark:text-emerald-400 tracking-wide block",children:"Saved / Allocated So Far"}),e.jsxs("span",{className:"text-base font-bold text-emerald-600 dark:text-emerald-400 font-data block mt-0.5",children:[i," ",z.toLocaleString("en-IN")]})]}),e.jsx(Yt,{className:"w-4 h-4 text-emerald-500 shrink-0"})]}),e.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800 shadow-2xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-rose-600 dark:text-rose-400 tracking-wide block",children:"Total Goals Gap"}),e.jsxs("span",{className:"text-base font-bold text-rose-600 dar
1k:text-rose-400 font-data block mt-0.5",children:[i," ",nt.toLocaleString("en-IN")]})]}),e.jsx(Wt,{className:"w-4 h-4 text-rose-500 shrink-0"})]}),e.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800 shadow-2xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-purple-600 dark:text-purple-400 tracking-wide block",children:"Overall Progress"}),e.jsxs("span",{className:"text-base font-bold text-purple-600 dark:text-purple-400 font-data block mt-0.5",children:[ot.toFixed(1),"% Achieved"]})]}),e.jsx(Le,{className:"w-4 h-4 text-purple-500 shrink-0"})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:C.map(t=>{const a=t.targetAmount>0?Math.min(100,t.currentSaved/t.targetAmount*100):0,s=Math.max(0,t.targetAmount-t.currentSaved),n=Math.max(1,t.targetYear-new Date().getFullYear()),l=s/(n*12),j={GraduationCap:e.jsx(Ht,{className:"w-5 h-5 text-blue-600"}),Heart:e.jsx(U,{className:"w-5 h-5 text-rose-600"}),Plane:e.jsx($t,{className:"w-5 h-5 text-indigo-600"}),Sun:e.jsx(Ot,{className:"w-5 h-5 text-amber-600"}),Target:e.jsx(Bt,{className:"w-5 h-5 text-emerald-600"})}[t.icon];return e.jsxs("div",{className:"p-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl shadow-xs space-y-3 flex flex-col justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"p-2 rounded-lg bg-slate-100 dark:bg-slate-800",children:j}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-slate-900 dark:text-slate-100",children:t.title}),e.jsxs("span",{className:"text-[10px] text-slate-400",children:["Target Year: ",e.jsx("strong",{className:"text-blue-600 dark:text-blue-400",children:t.targetYear})," (",n," years left)"]})]})]}),e.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-300",children:t.category})]}),t.notes&&e.jsx("p",{className:"text-[11px] text-slate-500 italic",children:t.notes}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-[11px] font-semibold",children:[e.jsx("span",{className:"text-slate-600 dark:text-slate-400",children:"Progress"}),e.jsxs("span",{className:"text-emerald-600 font-data",children:[a.toFixed(1),"%"]})]}),e.jsx("div",{className:"w-full h-2 rounded-full bg-slate-100 dark:bg-slate-800 overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-emerald-500 to-teal-600 transition-all duration-500",style:{width:`${a}%`}})})]})]}),e.jsxs("div",{className:"pt-2 border-t border-slate-100 dark:border-slate-800 grid grid-cols-2 gap-2 text-xs font-data",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-[10px] text-slate-400 font-sans block uppercase font-bold",children:"Target Goal (â¹)"}),e.jsx("input",{type:"number",value:t.targetAmount,onChange:Q=>fe(t.id,"targetAmount",Q.target.value),className:"w-full h-7 px-2 font-bold text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-slate-800 dark:text-slate-200 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-[10px] text-slate-400 font-sans block uppercase font-bold",children:"Saved So Far (â¹)"}),e.jsx("input",{type:"number",value:t.currentSaved,onChange:Q=>fe(t.id,"currentSaved",Q.target.value),className:"w-full h-7 px-2 font-bold text-xs rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-emerald-600 focus:outline-none focus:ring-1 focus:ring-blue-500"})]})]}),e.jsxs("div",{className:"p-2 bg-slate-50 dark:bg-slate-800/40 rounded-lg flex items-center justify-between text-[11px]",children:[e.jsx("span",{className:"text-slate-500 font-medium",children:"Monthly Savings Needed:"}),e.jsxs("span",{className:"font-bold font-data text-purple-600 dar
1k:text-purple-400",children:[i," ",l.toLocaleString("en-IN",{maximumFractionDigits:0})," / month"]})]})]},t.id)})})]}),De&&e.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl shadow-xl max-w-sm w-full overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-slate-50 dark:bg-slate-800/40",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-900 dark:text-slate-100",children:["Add ",M," Item"]}),e.jsx("button",{onClick:()=>L(!1),className:"p-1 hover:bg-slate-200 rounded",children:e.jsx(Re,{className:"w-3.5 h-3.5 text-slate-500"})})]}),e.jsxs("form",{onSubmit:at,className:"p-4 space-y-3 text-xs",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Item Description"}),e.jsx("input",{type:"text",placeholder:"e.g. Generators, Vehicles, Gold...",value:u.name,onChange:t=>N({...u,name:t.target.value}),className:"w-full h-8 px-2.5 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs",required:!0})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Category"}),e.jsxs(Ne,{value:u.category,onValueChange:t=>N({...u,category:t}),children:[e.jsx(we,{className:"w-full h-8 text-xs bg-white dark:bg-slate-900 border-slate-200 dark:border-slate-800",children:e.jsx(ke,{})}),e.jsxs(Ce,{children:[e.jsx(m,{value:"Real Estate & Land",children:"ð¢ Real Estate & Land"}),e.jsx(m,{value:"Generators & Power",children:"â¡ Generators & Power"}),e.jsx(m,{value:"Fixed Assets",children:"ð» IT Systems & Workstations"}),e.jsx(m,{value:"Vehicles & Fleet",children:"ð Vehicles & Cars"}),e.jsx(m,{value:"Gold & Treasury",children:"ðª Gold & Treasury Reserve"}),e.jsx(m,{value:"Cash & Bank",children:"Cash & Bank"}),e.jsx(m,{value:"Receivables",children:"Receivables"}),e.jsx(m,{value:"Investments",children:"Investments"}),e.jsx(m,{value:"Other Asset",children:"Other Asset"})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Initial Value (â¹)"}),e.jsx("input",{type:"number",placeholder:"0.00",value:u.value,onChange:t=>N({...u,value:t.target.value}),className:"w-full h-8 px-2.5 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-bold",required:!0})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>L(!1),className:"h-7 px-3 rounded border text-xs",children:"Cancel"}),e.jsxs("button",{type:"submit",className:p("h-7 px-3 rounded text-white text-xs font-semibold",M==="Asset"?"bg-emerald-600":"bg-rose-600"),children:["Save ",M]})]})]})]})}),Ye&&e.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl shadow-xl max-w-sm w-full overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-slate-50 dark:bg-slate-800/40",children:[e.jsx("h3",{className:"text-xs font-bold text-slate-900 dark:text-slate-100",children:"Add Life Goal / Family Fund"}),e.jsx("button",{onClick:()=>G(!1),className:"p-1 hover:bg-slate-200 rounded",children:e.jsx(Re,{className:"w-3.5 h-3.5 text-slate-500"})})]}),e.jsxs("form",{onSubmit:st,className:"p-4 space-y-3 text-xs",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:["Goal Title ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",placeholder:"e.g. Kids Overseas Higher Education",value:o.title,onChange:t=>f({...o,title:t.target.value}),className:"w-full h-8 px-2.5 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs",required:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Category"}),e.jsxs("select",{value:o.category,onChange:t=>f({...o,category:t.target.value}),className:"w-full h-8 px-2 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs",children:[e.jsx("option",{value:"Education",children:"ð Kids Education"}),e.jsx("option",{value:"Marriage",children:"ð Kids Marriage"}),e.jsx("option",{value:"Travel",children:"âï¸ Family Travel"}),e.jsx("option",{value:"Retirement",children:"ð
Retirement Fund"}),e.jsx("option",{value:"Custom",children:"ð¯ Custom Goal"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Target Year"}),e.jsx("input",{type:"number",value:o.targetYear,onChange:t=>f({...o,targetYear:Number(t.target.value)}),className:"w-full h-8 px-2 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Target Goal (â¹)"}),e.jsx("input",{type:"number",placeholder:"5000000",value:o.targetAmount,onChange:t=>f({...o,targetAmount:t.target.value}),className:"w-full h-8 px-2.5 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-bold",required:!0})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Saved So Far (â¹)"}),e.jsx("input",{type:"number",placeholder:"1000000",value:o.currentSaved,onChange:t=>f({...o,currentSaved:t.target.value}),className:"w-full h-8 px-2.5 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-bold"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-semibold text-slate-600 uppercase",children:"Notes / Purpose"}),e.jsx("input",{type:"text",placeholder:"Additional details...",value:o.notes,onChange:t=>f({...o,notes:t.target.value}),className:"w-full h-8 px-2.5 rounded border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2 border-t border-slate-100 dar
1k:border-slate-800",children:[e.jsx("button",{type:"button",onClick:()=>G(!1),className:"h-7 px-3 rounded border text-xs",children:"Cancel"}),e.jsxs("button",{type:"submit",className:"h-7 px-3 rounded bg-emerald-600 hover:bg-emerald-700 text-white text-xs font-semibold flex items-center gap-1",children:[e.jsx(Kt,{className:"w-3.5 h-3.5"})," Save Life Goal"]})]})]})]})})]})}export{ua as NetWorthPage,ua 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.