1import{l as e,o as t,s as n}from"./useSelector-BnRwIYQX.js";import{D as r,a as i,s as a}from"./QualificationFields-DS_PE4Qq.js";import{c as o,l as s,n as c,u as l}from"./LendingAreasMap-FGa5ipKN.js";var u=r(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),d=e(n(),1),f=t();function p(){let[e,t]=(0,d.useState)(75e4),[n,r]=(0,d.useState)(8e5),[u,p]=(0,d.useState)(15e4),[m,h]=(0,d.useState)(12e5),[g,_]=(0,d.useState)(10.5),[v,y]=(0,d.useState)(!1),b=o(n,u,m,e,g),x=[[`Loan amount`,e,t,5e5,5e6,25e3],[`Purchase price`,n,r,1e5,5e6,25e3],[`Rehab budget`,u,p,0,2e6,1e4],[`After-repair value`,m,h,25e4,8e6,25e3]];return(0,f.jsx)(`section`,{className:`section bg-muted`,children:(0,f.jsxs)(`div`,{className:`site-container`,children:[(0,f.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,f.jsx)(`p`,{className:`eyebrow`,children:`Deal Analyzer`}),(0,f.jsx)(`h2`,{className:`section-title mt-4`,children:`Model your next investment.`}),(0,f.jsx)(`p`,{className:`mt-4 text-muted-foreground`,children:`Adjust the assumptions to see an illustrative deal summary.`})]}),v?(0,f.jsx)(`div`,{id:`deal-application`,className:`mt-10 scroll-mt-28 bg-background p-7 md:p-10`,children:(0,f.jsx)(c,{linked:!1,redirectSource:typeof location<`u`?`Deal Analyzer â Submit Deal â `+location.href:`Deal Analyzer`,expedite:{loan_amount:i(e),purchase:String(n),rehab:String(u),arv:String(m)}})}):(0,f.jsxs)(`div`,{className:`mt-10 grid bg-background lg:grid-cols-[1.1fr_.9fr]`,children:[(0,f.jsxs)(`div`,{className:`space-y-8 p-7 md:p-10`,children:[x.map(([e,t,n,r,i,o])=>(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{className:`mb-3 flex justify-between gap-4`,children:[(0,f.jsx)(`label`,{className:`text-sm font-medium`,children:e}),(0,f.jsx)(`strong`,{children:s(t)})]}),(0,f.jsx)(a,{value:[t],min:r,max:i,step:o,onValueChange:e=>n(e[0]??t)})]},e)),(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{className:`mb-3 flex justify-between`,children:[(0,f.jsx)(`label`,{className:`text-sm font-medium`,children:`Interest rate`}),(0,f.jsxs)(`strong`,{children:[g.toFixed(1),`%`]})]}),(0,f.jsx)(a,{value:[g],min:7,max:16,step:.25,onValueChange:e=>_(e[0]??g)}
1)]}),(0,f.jsx)(`button`,{type:`button`,onClick:()=>{if(typeof window<`u`){let e=window;e.dataLayer=e.dataLayer||[],e.dataLayer.push({event:`deal_analyzer_submitted`,formPage:window.location.pathname})}y(!0),typeof window<`u`&&setTimeout(()=>document.getElementById(`deal-application`)?.scrollIntoView({behavior:`smooth`,block:`start`}),50)},className:`w-full rounded-[10px] bg-primary px-6 py-3.5 text-[15px] font-semibold text-primary-foreground transition hover:opacity-90 sm:w-auto`,children:`Submit Deal`})]}),(0,f.jsxs)(`div`,{className:`bg-primary p-7 text-primary-foreground md:p-10`,children:[(0,f.jsx)(`p`,{className:`eyebrow text-accent`,children:`Illustrative summary`}),(0,f.jsx)(`div`,{className:`mt-8 grid grid-cols-2 gap-px bg-primary-foreground/15`,children:[[`Total cost`,s(b.total)],[`Monthly interest`,s(l(e,g))],[`Loan-to-Value (LTV)`,`${b.ltv}%`],[`Loan-to-Cost (LTC)`,`${b.ltc}%`],[`Potential profit`,s(b.profit)],[`Rate`,`${g.toFixed(2)}%`]].map(([e,t])=>(0,f.jsxs)(`div`,{className:`bg-primary p-5`,children:[(0,f.jsx)(`span`,{className:`text-xs text-primary-foreground/50`,children:e}),(0,f.jsx)(`strong`,{className:`mt-2 block text-xl`,children:t})]},e))}),(0,f.jsx)(`p`,{className:`mt-5 text-xs leading-5 text-primary-foreground/50`,children:`For illustrative purposes only. This is not a commitment to lend or an offer of specific terms.`})]})]})]})})}export{u as n,p as t};
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.