1import{y as Rt,j as e,B as S,aI as ye,x as je,aW as Pt,bO as Ft,bP as St,bQ as Tt,a as It,P as Mt,v as Ze,T as et,C as m,b as h,c as u,H as Et,d as p,L as d,K as x,e as y,E as $t,G as Lt,I as ce,J as de,N as xe,O as At,Q as Bt,R as Ot,bR as Dt,o as qt,m as zt,aP as Wt,aQ as Ht,aR as tt,aS as W,aT as Ut,aU as H,f as at,bg as Vt,D as Yt,p as _t,q as X,r as Z,s as ee}from"./index-Byg2HWAE.js";import{r as o}from"./vendor-Qgthw7N1.js";import{C as me}from"./chart-pie-P9cErRnq.js";import{C as st}from"./calculator-C06MfOK6.js";import{C as Kt}from"./chart-line-DHDWAOEK.js";import{R as Gt,C as Qt,X as Jt,Y as Xt,T as Zt,L as ea,a as rt}from"./generateCategoricalChart-BoqWx9k4.js";import{L as ta,a as G}from"./LineChart-CNPEj-ac.js";import{S as aa}from"./share-DRHJpH16.js";import{C as sa}from"./copy-DV8e8Olv.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const ra=Rt("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);function B({isPercentage:i,onToggle:te,percentageLabel:k="Percentage",dollarLabel:O="Dollar Amount",size:T="sm",className:ae="",tooltipText:I}){const se={sm:"h-6 w-6 p-0",md:"h-8 w-8 p-1",lg:"h-10 w-10 p-2"},M={sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"},re=`Click to switch between ${k.toLowerCase()} and ${O.toLowerCase()}`,E=e.jsx(S,{variant:"ghost",size:"sm",onClick:te,className:ye(se[T],"transition-all duration-200 hover:scale-110 hover:bg-gray-100 dark:hover:bg-gray-800","border border-gray-200 dark:border-gray-700 rounded-md",i?"bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800":"bg-green-50 dark:bg-green-950 border-green-200 dark:border-green-800",ae),"aria-label":`Currently using ${i?k:O}. Click to switch to ${i?O:k}`,children:i?e.jsx(ra,{className:ye(M[T],"text-blue-600 dark:text-blue-400")}):e.jsx(je,{className:ye(M[T],"text-green-600 dark:text-green-400")})});return I||I!==!1?e.jsx(Pt,{children:e.jsxs(Ft,{children:[e.jsx(St,{asChild:!0,children:E}),e.jsx(Tt,{side:"top",className:"max-w-xs",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"font-medium",children:i?`${k} Mode`:`${O} Mode`}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:I||re})]})})]})}):E}const na=()=>({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Free Rental Property Investment Calculator",applicationCategory:"FinanceApplication",description:"Calculate rental property ROI, cash flow, cap rate, and investment returns. Free tool for real estate investors with detailed analysis and shareable reports.",url:typeof window<"u"?`${window.location.origin}/tools/rental-calculator`:"",operatingSystem:"Web Browser",softwareVersion:"1.0",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Cash flow calculation","Cash-on-cash ROI analysis","Cap rate calculation","Break-even analysis","30-year investment projection","Pro forma generation","Investment recommendation"],creator:{"@type":"Organization",name:"REPSShield",url:typeof window<"u"?window.location.origin:""}});function Na(){var Le,Ae;const[i,te]=o.useState(3e5),[k,O]=o.useState(20),[T,ae]=o.useState(7.5),[I,se]=o.useState(30),[M,re]=o.useState(3),[E,be]=o.useState(0),[l,fe]=o.useState(2500),[$,ve]=o.useState(0),[C,Ne]=o.useState(1.2),[R,we]=o.useState(1200),[f,ke]=o.useState(8),[v,Ce]=o.useState(5),[N,Re]=o.useState(5),[P,Pe]=o.useState(0),[F,Fe]=o.useState(0),[w,Se]=o.useState(5),[ne,nt]=o.useState(3),[le,lt]=o.useState(3),[la,oa]=o.useState(!0),[ia,ca]=o.useState(!0),[da,xa]=o.useState({propertyValue:!0,equity:!0,loanBalance:!0,totalReturn:!0,breakEven:!0}),[a,ot]=o.useState({propertyTaxes:!0,insurance:!1,propertyManagement:!0,maintenance:!0,vacancy:!0,hoa:!1,utilities:!1,capex:!0}),[ma,it]=o.useState(""),[Te,Ie]=o.useState(!1),[Me,Ee]=o.useState(!1),{toast:Q}=It(),[b,ct]=o.useState({cumulativeCashFlow:!0,totalEquity:!0,totalReturn:!0,loanBalance:!0,principalPayment:!1,interestPayment:!1}),U=t=>{ct(n=>({...n,[t]:!n[t]}))},L=t=>{ot(n=>({...n,[t]:!n[t]}))},c=t=>n=>{const r=n.target.value;if(r==="")t(0);else{const g=parseFloat(r);isNaN(g)||t(g)}};o.useEffect(()=>{document.title="Free Rental Property ROI Calculator â Real Estate Investment Analysis";let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content","Calculate rental property ROI, cash flow, and cap rate with our free investment calculator. Get instant analysis with cash-on-cash returns, break-even calculations, and 30-year projections for real estate investors.");const n=document.createElement("script");n.type="application/ld+json",n.textContent=JSON.stringify(na()),document.head.appendChild(n),typeof window<"u"&&window.gtag&&window.gtag("config","GTM-TZZ5448V",{page_title:"Free Rental Property Investment Calculator",page_location:window.location.href,content_group1:"Tools",content_group2:"Calculator"}),typeof window<"u"&&window.dataLayer&&window.dataLayer.push({event:"page_view",page_title:"Free Rental Property Investment Calculator",page_location:window.location.href,page_path:"/tools/rental-calculator",content_category:"Tools",content_subcategory:"Calculator"});
6const r=new URLSearchParams(window.location.search);return r.has("price")&&te(Number(r.get("price"))||3e5),r.has("down")&&O(Number(r.get("down"))||20),r.has("rate")&&ae(Number(r.get("rate"))||7.5),r.has("term")&&se(Number(r.get("term"))||30),r.has("closing")&&re(Number(r.get("closing"))||3),r.has("rehab")&&be(Number(r.get("rehab"))||0),r.has("rent")&&fe(Number(r.get("rent"))||2500),r.has("other")&&ve(Number(r.get("other"))||0),r.has("tax")&&Ne(Number(r.get("tax"))||1.2),r.has("ins")&&we(Number(r.get("ins"))||1200),r.has("mgmt")&&ke(Number(r.get("mgmt"))||8),r.has("maint")&&Ce(Number(r.get("maint"))||5),r.has("vac")&&Re(Number(r.get("vac"))||5),r.has("hoa")&&Pe(Number(r.get("hoa"))||0),r.has("util")&&Fe(Number(r.get("util"))||0),r.has("capex")&&Se(Number(r.get("capex"))||5),()=>{document.title="REPSShield - IRS REP Tracking & Compliance Tools",document.querySelectorAll('script[type="application/ld+json"]').forEach(j=>{var D;(D=j.textContent)!=null&&D.includes("rental-calculator")&&j.remove()})}},[]);const s=o.useMemo(()=>{const t=i*k/100,n=i*M/100,r=t+n+E,g=i-t,j=T/100/12,D=I*12,A=g>0?g*(j*Math.pow(1+j,D))/(Math.pow(1+j,D)-1):0,Be=a.propertyTaxes?i*C/100/12:C/12,Oe=a.insurance?i*R/100/12:R/12,ht=a.propertyManagement?l*f/100:f,ut=a.maintenance?l*v/100:v,pt=a.vacancy?l*N/100:N,De=a.hoa?l*P/100:P,qe=a.utilities?l*F/100:F,gt=a.capex?l*w/100:w,oe=A+Be+Oe+ht+ut+pt+De+qe+gt,he=l+$,V=he-oe,ze=V*12,ie=r>0?ze/r*100:0,yt=he*12-(oe-A)*12,ue=i>0?yt/i*100:0,jt=oe-$,We=[];let q=g,pe=0,He=0,Ue=0,z=l,ge=i;for(let J=1;J<=30;J++){J>1&&(z=z*(1+ne/100)),J>1&&(ge=ge*(1+le/100));let Ve=0,Ye=0;for(let Qe=1;Qe<=12;Qe++)if(q>0){const Je=q*j,Xe=A-Je;Ye+=Je,Ve+=Xe,q-=Xe,q<0&&(q=0)}He+=Ve,Ue+=Ye;const bt=z+$,ft=z*f/100,vt=z*v/100,Nt=z*N/100,wt=z*w/100,kt=A+Be+Oe+ft+vt+Nt+De+qe+wt,_e=(bt-kt)*12;pe+=_e;const Ke=ge-q,Ge=pe+Ke-r,Ct=r>0?Ge/r*100:0;We.push({year:J,loanBalance:q,principalPayment:He,interestPayment:Ue,totalEquity:Ke,annualCashFlow:_e,cumulativeCashFlow:pe,totalReturn:Ge,totalReturnPercentage:Ct})}let Y=!1,_="",K=0;return ie>=12&&V>=300&&ue>=8?(Y=!0,_="Excellent investment opportunity! Strong returns across all metrics.",K=95):ie>=8&&V>=200&&ue>=6?(Y=!0,_="Good investment with solid returns. Consider market conditions.",K=80):ie>=6&&V>=100?(Y=!0,_="Decent investment. Monitor closely and consider improvements.",K=65):V>=0?(Y=!1,_="Break-even or low return. Look for better opportunities.",K=45):(Y=!1,_="Negative cash flow. Not recommended without significant improvements.",K=20),{monthlyRent:l,otherIncome:$,totalIncome:he,monthlyExpenses:oe,monthlyCashFlow:V,annualCashFlow:ze,totalCashInvested:r,cashOnCashReturn:ie,capRate:ue,monthlyMortgage:A,breakEvenRent:jt,wouldBuy:Y,recommendation:_,profitabilityScore:K,loanAmount:g,purchasePrice:i,yearlyProjections:We}},[i,k,T,I,M,E,l,$,C,R,f,v,N,P,F,w,ne,le]),$e=()=>{const t=new URLSearchParams({price:i.toString(),down:k.toString(),rate:T.toString(),term:I.toString(),closing:M.toString(),rehab:E.toString(),rent:l.toString(),other:$.toString(),tax:C.toString(),ins:R.toString(),mgmt:f.toString(),maint:v.toString(),vac:N.toString(),hoa:P.toString(),util:F.toString(),capex:w.toString()}),n=`${window.location.origin}/tools/rental-calculator?${t.toString()}`;return it(n),n},dt=async()=>
6{const t=$e();try{await navigator.clipboard.writeText(t),Ie(!0),setTimeout(()=>Ie(!1),2e3),Q({title:"Link copied!",description:"Shareable link has been copied to your clipboard."})}catch{Q({title:"Error",description:"Failed to copy link to clipboard.",variant:"destructive"})}},xt=async()=>{const n=`<iframe src="${$e()}" width="100%" height="1200" frameborder="0"></iframe>`;try{await navigator.clipboard.writeText(n),Ee(!0),setTimeout(()=>Ee(!1),2e3),Q({title:"Embed code copied!",description:"HTML embed code has been copied to your clipboard."})}catch{Q({title:"Error",description:"Failed to copy embed code to clipboard.",variant:"destructive"})}},mt=()=>{window.print(),Q({title:"Download PDF",description:"Use your browser's print function to save as PDF."})};return e.jsx(Mt,{children:e.jsx("div",{className:"mobile-optimized",children:e.jsxs("div",{className:"lm-container lm-section-spacing",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-gray-100 mb-6 text-center",children:"Free Rental Property ROI Calculator â Real Estate Investment Analysis"}),e.jsxs("p",{className:"lm-body-lg text-gray-600 dark:text-gray-400 mb-6 max-w-3xl mx-auto text-center leading-relaxed space-y-2",children:["Calculate"," ",e.jsx("span",{className:"font-semibold text-gray-900 dark:text-white border-b-2 border-green-500",children:"cash flow"}),","," ",e.jsx("span",{className:"font-semibold text-gray-900 dark:text-white border-b-2 border-green-500",children:"ROI"}),","," ",e.jsx("span",{className:"font-semibold text-gray-900 dark:text-white border-b-2 border-green-500",children:"cap rate"}),", and get comprehensive investment analysis with 30-year projections. Make informed decisions with instant property evaluation and professional reports."]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 max-w-4xl mx-auto mb-6 px-4",children:[e.jsxs("div",{className:"group bg-white dark:bg-gray-900 rounded-xl p-4 border border-blue-100 dark:border-blue-800 shadow-sm transition-all duration-300 hover:shadow-md hover:border-blue-400 text-center",children:[e.jsx("div",{className:"bg-blue-100 dark:bg-blue-900 w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 transition-colors duration-300 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/70",children:e.jsx(Ze,{className:"h-6 w-6 text-blue-600 dark:text-blue-400 group-hover:text-blue-700 dark:group-hover:text-blue-300"})}),e.jsx("h3",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100 mb-1 transition-colors duration-300 group-hover:text-blue-900 dark:group-hover:text-blue-200",children:"Cash Flow Analysis"}),e.jsx("p",{className:"text-xs text-blue-700 dark:text-blue-300 leading-relaxed",children:"Instant monthly and annual cash flow calculations"})]}),e.jsxs("div",{className:"group bg-white dark:bg-gray-900 rounded-xl p-4 border border-green-100 dark:border-green-800 shadow-sm transition-all duration-300 hover:shadow-md hover:border-green-400 text-center",children:[e.jsx("div",{className:"bg-green-100 dark:bg-green-900 w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 transition-colors duration-300 group-hover:bg-green-200 dark:group-hover:bg-green-800/70",children:e.jsx(je,{className:"h-6 w-6 text-green-600 dark:text-green-400 group-hover:text-green-700 dark:group-hover:text-green-300"})}),e.jsx("h3",{className:"text-sm font-semibold text-green-900 dark:text-green-100 mb-1 transition-colors duration-300 group-hover:text-green-900 dark:group-hover:text-green-200",children:"ROI Calculation"}),e.jsx("p",{className:"text-xs text-green-700 dark:text-green-300 leading-relaxed",children:"Cash-on-cash returns and total investment performance"})]}),e.jsxs("div",{className:"group bg-white dark:bg-gray-900 rounded-xl p-4 border border-purple-100 dark:border-purple-800 shadow-sm transition-all duration-300 hover:shadow-md hover:border-purple-400 text-center",children:[e.jsx("div",{className:"bg-purple-100 dark:bg-purple-900 w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 transition-colors duration-300 group-hover:bg-purple-200 dark:group-hover:bg-purple-800/70",children:e.jsx(me,{className:"h-6 w-6 text-purple-600 dar
6k:text-purple-400 group-hover:text-purple-700 dark:group-hover:text-purple-300"})}),e.jsx("h3",{className:"text-sm font-semibold text-purple-900 dark:text-purple-100 mb-1 transition-colors duration-300 group-hover:text-purple-900 dark:group-hover:text-purple-200",children:"Cap Rate Analysis"}),e.jsx("p",{className:"text-xs text-purple-700 dark:text-purple-300 leading-relaxed",children:"Property value and income yield assessment"})]}),e.jsxs("div",{className:"group bg-white dark:bg-gray-900 rounded-xl p-4 border border-orange-100 dark:border-orange-800 shadow-sm transition-all duration-300 hover:shadow-md hover:border-orange-400 text-center",children:[e.jsx("div",{className:"bg-orange-100 dark:bg-orange-900 w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 transition-colors duration-300 group-hover:bg-orange-200 dark:group-hover:bg-orange-800/70",children:e.jsx(et,{className:"h-6 w-6 text-orange-600 dark:text-orange-400 group-hover:text-orange-700 dark:group-hover:text-orange-300"})}),e.jsx("h3",{className:"text-sm font-semibold text-orange-900 dark:text-orange-100 mb-1 transition-colors duration-300 group-hover:text-orange-900 dark:group-hover:text-orange-200",children:"Investment Score"}),e.jsx("p",{className:"text-xs text-orange-700 dark:text-orange-300 leading-relaxed",children:"Professional buy/pass recommendation system"})]})]}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx("span",{className:"text-green-600",children:"â"}),e.jsx("span",{children:"Instant calculations"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx("span",{className:"text-green-600",children:"â"}),e.jsx("span",{children:"Professional reports"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx("span",{className:"text-green-600",children:"â"}),e.jsx("span",{children:"Shareable analysis"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx("span",{className:"text-green-600",children:"â"}),e.jsx("span",{children:"100% free"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[e.jsxs("div",{className:"group bg-white dark:bg-gray-800 rounded-xl p-4 border border-green-100 dark:border-green-700 shadow-sm transition-all duration-300 hover:shadow-md hover:border-green-400 text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-green-600 mb-1 transition-colors duration-300 group-hover:text-green-700",children:["$",s.monthlyCashFlow.toLocaleString()]}),e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Monthly Cash Flow"})]}),e.jsxs("div",{className:"group bg-white dark:bg-gray-800 rounded-xl p-4 border border-blue-100 dark:border-blue-700 shadow-sm transition-all duration-300 hover:shadow-md hover:border-blue-400 text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-blue-600 mb-1 transition-colors duration-300 group-hover:text-blue-700",children:[s.cashOnCashReturn.toFixed(1),"%"]}),e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Cash-on-Cash ROI"})]}),e.jsxs("div",{className:"group bg-white dark:bg-gray-800 rounded-xl p-4 border border-purple-100 dark:border-purple-700 shadow-sm transition-all duration-300 hover:shadow-md hover:border-purple-400 text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-purple-600 mb-1 transition-colors duration-300 group-hover:text-purple-700",children:[s.capRate.toFixed(1),"%"]}),e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Cap Rate"})]}),e.jsxs("div",{className:"group bg-white dark:bg-gray-800 rounded-xl p-4 border border-gray-100 dark:border-gray-700 shadow-sm transition-all duration-300 hover:shadow-md hover:border-gray-400 text-center",children:[e.jsx("div",{className:`text-2xl font-bold mb-1 transition-colors duration-300 ${s.wouldBuy?"text-green-600 group-hover:text-green-700":"text-red-600 group-hover:text-red-700"}`,children:s.wouldBuy?"BUY":"PASS"}),e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Buy Recommendation"})]})]}
6),e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6",children:[e.jsxs(m,{className:"rounded-2xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-4",children:e.jsxs(u,{className:"flex items-center gap-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(Et,{className:"h-5 w-5 text-green-600"}),e.jsx("span",{children:"Purchase Information"})]})}),e.jsx(p,{className:"space-y-5",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"purchase-price",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Purchase Price"}),e.jsx(x,{id:"purchase-price",type:"number",value:i===0?"":i,onChange:c(te),placeholder:"300000",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"down-payment",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Down Payment (%)"}),e.jsx(x,{id:"down-payment",type:"number",value:k===0?"":k,onChange:c(O),placeholder:"20",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"interest-rate",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Interest Rate (%)"}),e.jsx(x,{id:"interest-rate",type:"number",step:"0.1",value:T===0?"":T,onChange:c(ae),placeholder:"7.5",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"loan-term",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Loan Term (years)"}),e.jsx(x,{id:"loan-term",type:"number",value:I===0?"":I,onChange:c(se),placeholder:"30",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"closing-costs",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Closing Costs (%)"}),e.jsx(x,{id:"closing-costs",type:"number",step:"0.1",value:M===0?"":M,onChange:c(re),placeholder:"3",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"rehab-budget",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Rehab Budget ($)"}),e.jsx(x,{id:"rehab-budget",type:"number",value:E===0?"":E,onChange:c(be),placeholder:"0",className:"text-sm"})]})]})})]}),e.jsxs(m,{className:"rounded-2xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-4",children:e.jsxs(u,{className:"flex items-center gap-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(je,{className:"h-5 w-5 text-green-600"}),e.jsx("span",{children:"Monthly Income & Appreciation"})]})}),e.jsx(p,{className:"space-y-5",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"monthly-rent",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Monthly Rent ($)"}),e.jsx(x,{id:"monthly-rent",type:"number",value:l===0?"":l,onChange:c(fe),placeholder:"2500",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"other-income",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Other Monthly Income ($)"}),e.jsx(x,{id:"other-income",type:"number",value:$===0?"":$,onChange:c(ve),placeholder:"0",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"rent-appreciation",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Rent Appreciation (% annually)"}),e.jsx(x,{id:"rent-appreciation",type:"number",step:"0.1",value:ne===0?"":ne,onChange:c(nt),placeholder:"3",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"property-appreciation",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Property Appreciation (% annually)"}),e.jsx(x,{id:"property-appreciation",type:"number",step:"0.1",value:le===0?"":le,onChange:c(lt),placeholder:"3",className:"text-sm"})]})]})})]})]}),e.jsxs(m,{className:"rounded-2xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-4",children:e.jsxs(u,{className:"flex items-center gap-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(me,{className:"h-5 w-5 text-green-600"}),e.jsx("span",{children:"Monthly Expenses"}),e.jsx(y,{variant:"outline",className:"ml-2 text-xs px-2 py-0.5",children:"Toggle % or $"})]})}),e.jsxs(p,{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"property-taxes",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Property Taxes (",a.propertyTaxes?"% annually":"$ annually",")"]}),e.jsx(B,{isPercentage:a.propertyTaxes,onToggle:()=>L("propertyTaxes"),percentageLabel:"% of property value annually",dollarLabel:"Fixed dollar amount annually",tooltipText:"Switch between percentage of property value or fixed dollar amount"})]}),e.jsx(x,{id:"property-taxes",type:"number",step:a.propertyTaxes?"0.1":"1",value:C===0?"":C,onChange:c(Ne),placeholder:a.propertyTaxes?"1.2":"3600",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"insurance",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Insurance (",a.insurance?"% annually":"$ annually",")"]}),e.jsx(B,{isPercentage:a.insurance,onToggle:()=>L("insurance"),percentageLabel:"% of property value annually",dollarLabel:"Fixed dollar amount annually",tooltipText:"Switch between percentage of property value or fixed dollar amount"})]}),e.jsx(x,{id:"insurance",type:"number",step:a.insurance?"0.1":"1",value:R===0?"":R,onChange:c(we),placeholder:a.insurance?"0.4":"1200",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"property-management",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Property Management (",a.propertyManagement?"% of rent":"$ monthly",")"]}),e.jsx(B,{isPercentage:a.propertyManagement,onToggle:()=>L("propertyManagement"),percentageLabel:"% of monthly rent",dollarLabel:"Fixed dollar amount monthly",tooltipText:"Switch between percentage of rent or fixed dollar amount"})]}),e.jsx(x,{id:"property-management",type:"number",step:a.propertyManagement?"0.1":"1",value:f===0?"":f,onChange:c(ke),placeholder:a.propertyManagement?"8":"200",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"maintenance",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Maintenance Reserve (",a.maintenance?"% of rent":"$ monthly",")"]}),e.jsx(B,{isPercentage:a.maintenance,onToggle:()=>L("maintenance"),percentageLabel:"% of monthly rent",dollarLabel:"Fixed dollar amount monthly",tooltipText:"Switch between percentage of rent or fixed dollar amount"})]}),e.jsx(x,{id:"maintenance",type:"number",step:a.maintenance?"0.1":"1",value:v===0?"":v,onChange:c(Ce),placeholder:a.maintenance?"5":"125",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"vacancy",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Vacancy Reserve (",a.vacancy?"% of rent":"$ monthly",")"]}),e.jsx(B,{isPercentage:a.vacancy,onToggle:()=>L("vacancy"),percentageLabel:"% of monthly rent",dollarLabel:"Fixed dollar amount monthly",tooltipText:"Switch between percentage of rent or fixed dollar amount"})]}),e.jsx(x,{id:"vacancy",type:"number",step:a.vacancy?"0.1":"1",value:N===0?"":N,onChange:c(Re),placeholder:a.vacancy?"5":"125",className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"hoa",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["HOA Fees (",a.hoa?"% of rent":"$ monthly",")"]}),e.jsx(B,{isPercentage:a.hoa,onToggle:()=>L("hoa"),percentageLabel:"% of monthly rent",dollarLabel:"Fixed dollar amount monthly",tooltipText:"Switch between percentage of rent or fixed dollar amount"})]}),e.jsx(x,{id:"hoa",type:"number",step:a.hoa?"0.1":"1",value:P===0?"":P,onChange:c(Pe),placeholder:(a.hoa,"0"),className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"utilities",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Utilities (",a.utilities?"% of rent":"$ monthly",")"]}),e.jsx(B,{isPercentage:a.utilities,onToggle:()=>L("utilities"),percentageLabel:"% of monthly rent",dollarLabel:"Fixed dollar amount monthly",tooltipText:"Switch between percentage of rent or fixed dollar amount"})]}),e.jsx(x,{id:"utilities",type:"number",step:a.utilities?"0.1":"1",value:F===0?"":F,onChange:c(Fe),placeholder:(a.utilities,"0"),className:"text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(d,{htmlFor:"capex",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["CapEx Reserve (",a.capex?"% of rent":"$ monthly",")"]}),e.jsx(B,{isPercentage:a.capex,onToggle:()=>L("capex"),percentageLabel:"% of monthly rent",dollarLabel:"Fixed dollar amount monthly",tooltipText:"Switch between percentage of rent or fixed dollar amount"})]}),e.jsx(x,{id:"capex",type:"number",step:a.capex?"0.1":"1",value:w===0?"":w,onChange:c(Se),placeholder:a.capex?"5":"125",className:"text-sm"})]})]})]}),e.jsxs(m,{className:"mb-6",children:[e.jsx(h,{children:e.jsxs(u,{className:"flex items-center gap-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(me,{className:"h-5 w-5 text-green-600"}),e.jsx("span",{className:"tracking-tight",children:"Investment Analysis Dashboard"})]})}),e.jsx(p,{children:e.jsxs($t,{defaultValue:"summary",className:"w-full",children:[e.jsxs(Lt,{className:"grid w-full grid-cols-2 grid-rows-2 gap-1 sm:gap-0 sm:grid-cols-4 sm:grid-rows-1",children:[e.jsx(ce,{value:"summary",className:"text-xs px-2 py-2 sm:text-sm sm:px-4 sm:py-3",children:"Summary"}),e.jsx(ce,{value:"expenses",className:"text-xs px-2 py-2 sm:text-sm sm:px-4 sm:py-3",children:"Expenses"}),e.jsx(ce,{value:"projections",className:"text-xs px-2 py-2 sm:text-sm sm:px-4 sm:py-3",children:"Projections"}),e.jsx(ce,{value:"returns",className:"text-xs px-2 py-2 sm:text-sm sm:px-4 sm:py-3",children:"Returns"})]}),e.jsx(de,{value:"summary",className:"space-y-6",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:[e.jsxs(m,{className:"rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-2",children:e.jsxs(u,{className:"flex items-center gap-2 text-md font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(et,{className:"h-5 w-5 text-green-600"}),"Key Metrics"]})}),e.jsxs(p,{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Monthly Cash Flow"}),e.jsxs(y,{className:"px-2 py-0.5 text-xs",variant:s.monthlyCashFlow>=0?"default":"destructive",children:["$",s.monthlyCashFlow.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Cash-on-Cash ROI"}),e.jsxs(y,{className:"px-2 py-0.5 text-xs",variant:s.cashOnCashReturn>=8?"default":"secondary",children:[s.cashOnCashReturn.toFixed(2),"%"]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Cap Rate"}
6),e.jsxs(y,{className:"px-2 py-0.5 text-xs",variant:s.capRate>=6?"default":"secondary",children:[s.capRate.toFixed(2),"%"]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Break-even Rent"}),e.jsxs("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:["$",s.breakEvenRent.toFixed(2)]})]}),e.jsx(xe,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wide",children:"Investment Rules"}),e.jsxs("div",{className:"flex justify-between items-center text-xs",children:[e.jsx("span",{children:"1% Rule"}),e.jsxs(y,{className:"px-2 py-0.5 text-xs",variant:l/i*100>=1?"default":"secondary",children:[(l/i*100).toFixed(2),"%"]})]}),e.jsxs("div",{className:"flex justify-between items-center text-xs",children:[e.jsx("span",{children:"50% Rule"}),e.jsxs(y,{className:"px-2 py-0.5 text-xs",variant:s.monthlyExpenses+s.monthlyMortgage<=l*.5?"default":"secondary",children:[((s.monthlyExpenses+s.monthlyMortgage)/l*100).toFixed(0),"%"]})]})]})]})]}),e.jsxs(m,{className:"rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-2",children:e.jsxs(u,{className:"flex items-center gap-2 text-md font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(At,{className:"h-5 w-5 text-green-600"}),"Investment Analysis"]})}),e.jsxs(p,{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold mb-1",style:{color:s.wouldBuy?"#10B981":"#EF4444"},children:[s.profitabilityScore,"/100"]}),e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Profitability Score"})]}),e.jsx(Bt,{children:e.jsx(Ot,{className:"text-sm",children:s.recommendation})}),e.jsx("div",{className:"flex items-center justify-center gap-2",children:s.wouldBuy?e.jsxs(y,{className:"bg-green-100 text-green-800 px-2 py-0.5 text-xs flex items-center gap-1",children:[e.jsx(Ze,{className:"h-4 w-4"}),"Recommended"]}):e.jsxs(y,{className:"bg-gray-100 text-gray-800 px-2 py-0.5 text-xs flex items-center gap-1",children:[e.jsx(Dt,{className:"h-4 w-4"}),"Not Recommended"]})})]})]}),e.jsxs(m,{className:"rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-2",children:e.jsxs(u,{className:"flex items-center gap-2 text-md font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(st,{className:"h-5 w-5 text-green-600"}),"Financial Summary"]})}),e.jsxs(p,{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Total Cash Invested"}),e.jsxs("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:["$",s.totalCashInvested.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Monthly Income"}),e.jsxs("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:["$",s.totalIncome.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Monthly Expenses"}),e.jsxs("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:["$",s.monthlyExpenses.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Monthly Mortgage"}),e.jsxs("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:["$",s.monthlyMortgage.toFixed(2)]})]}),e.jsx(xe,{}),e.jsxs("div",{className:"flex justify-between items-center font-medium",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Annual Cash Flow"}),e.jsxs("span",{className:"text-gray-900 dark:text-gray-100",children:["$",s.annualCashFlow.toFixed(2)]})]}),e.jsx(xe,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wide",children:"Advanced Metrics"}),e.jsxs("div",{className:"flex justify-between items-center text-xs",children:[e.jsx("span",{children:"Internal Rate of Return (IRR)"}),e.jsxs("span",{className:"font-medium",children:[(()=>{var g;const t=((g=s.yearlyProjections[29])==null?void 0:g.totalReturn)||0;return((Math.pow(Math.abs(t)/s.totalCashInvested,1/30)-1)*100).toFixed(1)})(),"%"]})]})]})]})]})]})}),e.jsx(de,{value:"expenses",className:"space-y-6",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs(m,{className:"rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-2",children:e.jsxs(u,{className:"flex items-center gap-2 text-sm font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(me,{className:"h-5 w-5 text-green-600"}),"Monthly Expense Breakdown"]})}),e.jsx(p,{className:"space-y-3 text-sm",children:[{name:"Principal & Interest",value:s.monthlyMortgage,color:"bg-blue-500"},{name:"Property Taxes",value:a.propertyTaxes?i*C/100/12:C/12,color:"bg-red-500"},{name:"Insurance",value:a.insurance?i*R/100/12:R/12,color:"bg-yellow-500"},{name:"Management Fees",value:a.propertyManagement?l*f/100:f,color:"bg-green-500"},{name:"Maintenance",value:a.maintenance?l*v/100:v,color:"bg-purple-500"},{name:"Vacancy Reserve",value:a.vacancy?l*N/100:N,color:"bg-orange-500"},{name:"CapEx Reserve",value:a.capex?l*w/100:w,color:"bg-cyan-500"},{name:"HOA",value:a.hoa?l*P/100:P,color:"bg-lime-500"},{name:"Utilities",value:a.utilities?l*F/100:F,color:"bg-indigo-500"}].map((t,n)=>{const r=(t.value/s.monthlyExpenses*100).toFixed(1);return e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-4 h-4 rounded ${t.color}`}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300 text-sm",children:t.name})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:["$",t.value.toFixed(0)]}),e.jsxs("div",{className:"text-xs text-gray-500",children:[r,"%"]})]})]},n)})})]}),e.jsxs(m,{className:"rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsx(h,{className:"pb-2",children:e.jsxs(u,{className:"flex items-center gap-2 text-md font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(st,{className:"h-5 w-5 text-green-600"}),"Expense Details"]}
6)}),e.jsxs(p,{className:"space-y-2 text-sm",children:[[{label:"Principal & Interest",value:s.monthlyMortgage},{label:"Property Taxes",value:a.propertyTaxes?i*C/100/12:C/12},{label:"Insurance",value:a.insurance?i*R/100/12:R/12},{label:"Management Fees",value:a.propertyManagement?l*f/100:f},{label:"Maintenance",value:a.maintenance?l*v/100:v},{label:"Vacancy Reserve",value:a.vacancy?l*N/100:N},{label:"CapEx Reserve",value:a.capex?l*w/100:w},{label:"HOA",value:a.hoa?l*P/100:P},{label:"Utilities",value:a.utilities?l*F/100:F}].map((t,n)=>e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:[t.label,":"]}),e.jsxs("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:["$",t.value.toFixed(0)]})]},n)),e.jsx(xe,{}),e.jsxs("div",{className:"flex justify-between font-bold text-base text-gray-900 dark:text-gray-100",children:[e.jsx("span",{children:"Total Monthly Expenses:"}),e.jsxs("span",{className:"text-red-600",children:["$",s.monthlyExpenses.toFixed(0)]})]})]})]})]})}),e.jsx(de,{value:"projections",className:"space-y-6",children:e.jsxs(m,{children:[e.jsx(h,{children:e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsx(Kt,{className:"h-5 w-5"}),"30-Year Cash Flow & Return Projections"]})}),e.jsxs(p,{children:[e.jsx("div",{className:"mb-4 text-sm text-gray-600 dark:text-gray-400",children:"Key milestone projections showing long-term investment performance"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[5,10,15,20,25,30].map(t=>{const n=s.yearlyProjections.find(r=>r.year===t);return n?e.jsxs("div",{className:"p-4 border rounded-lg",children:[e.jsxs("div",{className:"text-lg font-bold mb-2",children:["Year ",t]}),e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Cash Flow:"}),e.jsxs("span",{className:"font-semibold",children:["$",n.cumulativeCashFlow.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Total Return:"}),e.jsxs("span",{className:"font-semibold",children:["$",n.totalReturn.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"ROI:"}),e.jsxs(y,{variant:n.totalReturnPercentage>=0?"default":"destructive",children:[n.totalReturnPercentage.toFixed(1),"%"]})]})]})]},t):null})})]})]})}),e.jsx(de,{value:"returns",className:"space-y-6",children:e.jsxs(m,{children:[e.jsxs(h,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsx(qt,{className:"h-5 w-5"}),"Break-Even & Equity Growth Over Time"]}),e.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Track when your investment breaks even and visualize long-term equity growth"})]}),e.jsx(p,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs(m,{children:[e.jsx(h,{children:e.jsx(u,{className:"text-lg",children:"Break-Even Analysis"})}),e.jsxs(p,{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm",children:"Break-Even Rent:"}),e.jsxs("span",{className:"font-semibold text-lg",children:["$",s.breakEvenRent.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm",children:"Current Rent:"}),e.jsxs("span",{className:"font-semibold text-lg",children:["$",l.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm",children:"Monthly Difference:"}),e.jsxs(y,{variant:l>=s.breakEvenRent?"default":"destructive",children:["$",(l-s.breakEvenRent).toFixed(2)]})]}),e.jsx("div",{className:"pt-2 border-t",children:e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:l>=s.breakEvenRent?"â
Property is cash flow positive":"â ï¸ Property requires higher rent to break even"})})]})]}),e.jsxs(m,{children:[e.jsx(h,{children:e.jsx(u,{className:"text-lg",children:"Investment Summary"})}),e.jsxs(p,{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm",children:"Initial Investment:"}),e.jsxs("span",{className:"font-semibold",children:["$",s.totalCashInvested.toLocaleStr
6ing()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm",children:"Annual Cash Flow:"}),e.jsxs(y,{variant:s.annualCashFlow>=0?"default":"destructive",children:["$",s.annualCashFlow.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm",children:"Cash-on-Cash ROI:"}),e.jsxs(y,{variant:s.cashOnCashReturn>=8?"default":"secondary",children:[s.cashOnCashReturn.toFixed(2),"%"]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm",children:"Cap Rate:"}),e.jsxs(y,{variant:s.capRate>=6?"default":"secondary",children:[s.capRate.toFixed(2),"%"]})]})]})]})]}),e.jsxs(m,{children:[e.jsxs(h,{children:[e.jsx(u,{className:"text-lg",children:"Interactive 30-Year Investment Analysis"}),e.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Track cash flow, equity growth, loan paydown, and break-even analysis over time"})]}),e.jsxs(p,{children:[e.jsxs("div",{className:"mb-6 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsx("div",{className:"text-sm font-medium mb-3",children:"Display Metrics:"}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2",children:[e.jsxs(S,{variant:b.cumulativeCashFlow?"default":"outline",size:"sm",onClick:()=>U("cumulativeCashFlow"),className:"text-xs flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),"Cash Flow"]}),e.jsxs(S,{variant:b.totalEquity?"default":"outline",size:"sm",onClick:()=>U("totalEquity"),className:"text-xs flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),"Total Equity"]}),e.jsxs(S,{variant:b.totalReturn?"default":"outline",size:"sm",onClick:()=>U("totalReturn"),className:"text-xs flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-500"}),"Total Return"]}),e.jsxs(S,{variant:b.loanBalance?"default":"outline",size:"sm",onClick:()=>U("loanBalance"),className:"text-xs flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500"}),"Loan Balance"]}),e.jsxs(S,{variant:b.principalPayment?"default":"outline",size:"sm",onClick:()=>U("principalPayment"),className:"text-xs flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-500"}),"Principal Paid"]}),e.jsxs(S,{variant:b.interestPayment?"default":"outline",size:"sm",onClick:()=>U("interestPayment"),className:"text-xs flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-cyan-500"}),"Interest Paid"]})]})]}),e.jsx("div",{className:"h-96 w-full",children:((Le=s.yearlyProjections)==null?void 0:Le.length)>0?e.jsx(Gt,{width:"100%",height:"100%",children:e.jsxs(ta,{data:s.yearlyProjections.filter((t,
6n)=>n%2===0||n===s.yearlyProjections.length-1),margin:{top:20,right:30,left:20,bottom:20},children:[e.jsx(Qt,{strokeDasharray:"3 3",className:"opacity-30"}),e.jsx(Jt,{dataKey:"year",className:"text-xs",tick:{fontSize:12}}),e.jsx(Xt,{className:"text-xs",tick:{fontSize:12},tickFormatter:t=>`$${Math.round(t/1e3)}k`}),e.jsx(Zt,{content:({active:t,payload:n,label:r})=>{if(t&&n&&n.length){const g=s.yearlyProjections.find(j=>j.year===Number(r));return e.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 border rounded-lg shadow-lg max-w-xs",children:[e.jsxs("p",{className:"font-semibold mb-2",children:["Year ",r]}),n.map((j,D)=>{var A;return e.jsxs("p",{className:"text-sm",style:{color:j.color},children:[j.name,": $",(A=j.value)==null?void 0:A.toLocaleString()]},D)}),g&&e.jsxs("div",{className:"mt-2 pt-2 border-t text-xs text-gray-600 dark:text-gray-400",children:[e.jsxs("p",{children:["Break-even:"," ",g.cumulativeCashFlow>=0?"â
Achieved":"â³ Pending"]}),e.jsxs("p",{children:["ROI:"," ",g.totalReturnPercentage.toFixed(1),"%"]})]})]})}return null}}),e.jsx(ea,{}),b.cumulativeCashFlow&&e.jsx(G,{type:"monotone",dataKey:"cumulativeCashFlow",stroke:"#2563eb",strokeWidth:3,name:"Cumulative
6Cash Flow",dot:{fill:"#2563eb",strokeWidth:2,r:3},activeDot:{r:6,fill:"#2563eb"}}),b.totalEquity&&e.jsx(G,{type:"monotone",dataKey:"totalEquity",stroke:"#059669",strokeWidth:3,name:"Total Equity",dot:{fill:"#059669",strokeWidth:2,r:3},activeDot:{r:6,fill:"#059669"}}),b.totalReturn&&e.jsx(G,{type:"monotone",dataKey:"totalReturn",stroke:"#7c3aed",strokeWidth:3,name:"Total Return",dot:{fill:"#7c3aed",strokeWidth:2,r:3},activeDot:{r:6,fill:"#7c3aed"}}),b.loanBalance&&e.jsx(G,{type:"monotone",dataKey:"loanBalance",stroke:"#dc2626",strokeWidth:3,name:"Remaining Loan Balance",dot:{fill:"#dc2626",strokeWidth:2,r:3},activeDot:{r:6,fill:"#dc2626"}}),b.principalPayment&&e.jsx(G,{type:"monotone",dataKey:"principalPayment",stroke:"#ea580c",strokeWidth:3,name:"Cumulative Principal Paid",dot:{fill:"#ea580c",strokeWidth:2,r:3},activeDot:{r:6,fill:"#ea580c"}}),b.interestPayment&&e.jsx(G,{type:"monotone",dataKey:"interestPayment",stroke:"#0891b2",strokeWidth:3,name:"Cumulative Interest Paid",dot:{fill:"#0891b2",strokeWidth:2,r:3},activeDot:{r:6,fill:"#0891b2"}}),e.jsx(rt,{y:0,stroke:"#ef4444",strokeDasharray:"5 5"}),(()=>{const t=s.yearlyProjections.find(n=>n.cumulativeCashFlow>=0);return t?e.jsx(rt,{x:t.year,stroke:"#16a34a",strokeDasharray:"3 3",label:{value:"Break-Even",position:"top"}}):null})()]})}):e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-gray-500",children:"Enter property details to see projections"})})}),((Ae=s.yearlyProjections)==null?void 0:Ae.length)>0&&e.jsx("div",{className:"mt-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg",children:(()=>{const t=s.yearlyProjections.find(n=>n.cumulativeCashFlow>=0);return t?e.jsxs("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:["ð¯ ",e.jsx("strong",{children:"Break-Even Point:"})," ","Year ",t.year," - Your investment becomes cash flow positive!"]}):e.jsxs("p",{className:"text-sm text-red-700 dark:text-red-300",children:["â ï¸ ",e.jsx("strong",{children:"Break-Even:"})," This investment does not break even within 30 years based on current projections."]})})()})]})]})]})})]})})]})})]}),e.jsxs(m,{children:[e.jsx(h,{children:e.jsxs(u,{className:"flex items-center gap-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(zt,{className:"h-5 w-5 text-green-600"}),"30-Year Investment Projection"]})}),e.jsxs(p,{children:[e.jsxs("div",{className:"mb-4 text-sm text-gray-600 dark:text-gray-400",children:["Showing ",s.yearlyProjections.length," year projections ⢠Scroll to view all years"]}),e.jsx("div",{className:"overflow-x-auto max-h-80 sm:max-h-96 overflow-y-auto border rounded-lg",children:e.jsxs(Wt,{children:[e.jsx(Ht,{className:"sticky top-0 bg-white dark:bg-gray-900 z-10",children:e.jsxs(tt,{children:[e.jsx(W,{className:"bg-white dark:bg-gray-900",children:"Year"}),e.jsx(W,{className:"bg-white dark:bg-gray-900",children:"Annual Cash Flow"}),e.jsx(W,{className:"bg-white dark:bg-gray-900",children:"Cumulative
6Cash Flow"}),e.jsx(W,{className:"bg-white dark:bg-gray-900",children:"Loan Balance"}),e.jsx(W,{className:"bg-white dark:bg-gray-900",children:"Total Equity"}),e.jsx(W,{className:"bg-white dark:bg-gray-900",children:"Total Return"}),e.jsx(W,{className:"bg-white dark:bg-gray-900",children:"Total Return %"})]})}),e.jsx(Ut,{children:s.yearlyProjections.map(t=>e.jsxs(tt,{children:[e.jsx(H,{className:"font-medium",children:t.year}),e.jsxs(H,{children:["$",t.annualCashFlow.toFixed(0)]}),e.jsxs(H,{children:["$",t.cumulativeCashFlow.toFixed(0)]}),e.jsxs(H,{children:["$",t.loanBalance.toFixed(0)]}),e.jsxs(H,{children:["$",t.totalEquity.toFixed(0)]}),e.jsxs(H,{children:["$",t.totalReturn.toFixed(0)]}),e.jsx(H,{children:e.jsxs(y,{variant:t.totalReturnPercentage>=0?"default":"destructive",children:[t.totalReturnPercentage.toFixed(1),"%"]})})]},t.year))})]})})]})]}),e.jsxs(m,{children:[e.jsx(h,{children:e.jsxs(u,{className:"flex items-center gap-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:[e.jsx(aa,{className:"h-5 w-5 text-green-600"}),"Share & Export Options"]})}),e.jsx(p,{className:"space-y-6",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[e.jsxs(S,{onClick:dt,variant:"outline",className:"flex items-center gap-2 w-full min-h-[48px]",children:[Te?e.jsx(at,{className:"h-4 w-4"}):e.jsx(sa,{className:"h-4 w-4"}),Te?"Copied!":"Copy Shareable Link"]}),e.jsxs(S,{onClick:xt,variant:"outline",className:"flex items-center gap-2 w-full min-h-[48px]",children:[Me?e.jsx(at,{className:"h-4 w-4"}):e.jsx(Vt,{className:"h-4 w-4"}),Me?"Copied!":"Copy Embed Code"]}),e.jsxs(S,{onClick:mt,variant:"outline",className:"flex items-center gap-2 w-full min-h-[48px]",children:[e.jsx(Yt,{className:"h-4 w-4"}),"Download PDF"]})]})})]}),e.jsx("section",{className:"pt-16 pb-12 bg-white",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-10 text-center leading-tight",children:["Frequently Asked"," ",e.jsx("span",{className:"text-green-600",children:"Questions"})]}),e.jsxs(_t,{type:"single",collapsible:!0,className:"w-full space-y-4",children:[e.jsxs(X,{value:"faq-1",className:"border border-gray-200 rounded-2xl shadow-sm",children:[e.jsx(Z,{className:"text-green-700 text-md font-semibold hover:no-underline focus:outline-none px-6 py-4 flex justify-between items-center transition-colors duration-300",children:"How do I calculate ROI on a rental property?"}),e.jsx(ee,{className:"px-6 pb-6 text-gray-700 leading-relaxed",children:"Cash-on-cash ROI is calculated by dividing your annual cash flow by your total cash invested (down payment + closing costs + rehab). A good rental property ROI is typically 8% or higher. Our calculator automatically computes this for you by taking your monthly cash flow, multiplying by 12, and dividing by your total investment."})]}),e.jsxs(X,{value:"faq-2",className:"border border-gray-200 rounded-2xl shadow-sm",children:[e.jsx(Z,{className:"text-green-700 text-md font-semibold hover:no-underline focus:outline-none px-6 py-4 flex justify-between items-center transition-colors duration-300",children:"What is a good cash flow for rental property?"}),e.jsx(ee,{className:"px-6 pb-6 text-gray-700 leading-relaxed",children:"Positive cash flow means your rental income exceeds all expenses including mortgage, taxes, insurance, and maintenance. Aim for at least $100-200 positive cash flow per month after all expenses to account for unexpected costs. This ensures you have a buffer for major repairs and market changes."})]}),e.jsxs(X,{value:"faq-3",className:"border border-gray-200 rounded-2xl shadow-sm",children:[e.jsx(Z,{className:"text-green-700 text-md font-semibold hover:no-underline focus:outline-none px-6 py-4 flex justify-between items-center transition-colors duration-300",children:"How much should I budget for rental property expenses?"}),e.jsx(ee,{className:"px-6 pb-6 text-gray-700 leading-relaxed",children:"Budget 50% of rental income for expenses (50% rule). This includes property management (8-12%), maintenance (5-10%), vacancy (5-10%), insurance, taxes, and capital expenditures. Our calculator helps you track all these expenses accurately so you get realistic projections for your investment."})]}),e.jsxs(X,{value:"faq-4",className:"border border-gray-200 rounded-2xl shadow-sm",children:[e.jsx(Z,{className:"text-green-700 text-md font-semibold hover:no-underline focus:outline-none px-6 py-4 flex justify-between items-center transition-colors duration-300",children:"What is cap rate and how is it calculated?"}),e.jsx(ee,{className:"px-6 pb-6 text-gray-700 leading-relaxed",children:"Cap rate (capitalization rate) is the annual net operating income divided by the property purchase price. It measures the property's earning potential independent of financing. Good cap rates typically range from 4-10% depending on the market. Higher cap rates indicate higher returns but often come with higher risk."})]}),e.jsxs(X,{value:"faq-5",className:"border border-gray-200 rounded-2xl shadow-sm",children:[e.jsx(Z,{className:"text-green-700 text-md font-semibold hover:no-underline focus:outline-none px-6 py-4 flex justify-between items-center transition-colors duration-300",children:"How to analyze real estate deals quickly?"}),e.jsx(ee,{className:"px-6 pb-6 text-gray-700 leading-relaxed",children:"Use the 1% rule as a quick filter (monthly rent ⥠1% of purchase price), then calculate cash flow, cash-on-cash return, and cap rate for complete analysis. Our calculator does all these calculations instantly, helping you evaluate deals in seconds rather than hours of manual work."})]})]}),e.jsxs("div",{className:`mt-10 group flex flex-col rounded-2xl border border-gray-200 dark:border-gray-700 7 bg-white dark:bg-gray-900 shadow-sm transition-all duration-300 ease-in-out 8 hover:border-green-600 hover:shadow-lg hover:shadow-green-100/30`,children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4 px-6 pt-6",children:[e.jsx("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center 9 bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 10 group-hover:scale-105 transition-transform duration-300 ease-in-out`,children:e.jsx("span",{className:"text-2xl leading-none",children:"ð¡"})}),e.jsx("h4",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Pro Tip for Real Estate Investors"})]}),e.jsx("p",{className:"text-left text-gray-600 dark:text-gray-400 text-base leading-relaxed mb-6 px-6",children:"Always run multiple scenarios with different rent amounts, vacancy rates, and expense estimates. The best investment decisions come when you understand how changes in key variables affect your returns. Use our calculatorâs shareable link feature to compare properties side-by-side with ease."})]})]})})})]})]})})})}export{Na 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.