1import{_ as F,j as i,a5 as R,k as b,D as f,a as w,c as $,b as e,d as s,i as g,g as c,w as B,ai as S,F as x,x as N}from"./app-3768782b.js";import{s as v}from"./inputnumber.esm-f74862e5.js";import"./_commonjsHelpers-23102255.js";import"./button.esm-8b0ac0a0.js";import"./basecomponent.esm-6dc113c6.js";import"./index.esm-f5c14dfc.js";import"./ripple.esm-9847dd44.js";import"./inputtext.esm-c3a02e28.js";const U={class:"mortgage-calculator"},Y={class:"title"},L={class:"calculator-content"},j={class:"inputs"},A={class:"input"},E={for:"price"},q={class:"price-input-wrapper main-input with-currency"},z={class:"price-input-currency"},G={class:"input"},H={for:"down_payment"},J={class:"down-payment-inputs"},K={class:"price-input-wrapper main-input with-currency"},O={class:"price-input-currency"},Q={class:"price-input-wrapper"},T={class:"input"},W={for:"mortgage_term"},X=["value"],Z={class:"input"},ee={for:"interest_rate"},te={class:"rate-btn-wrapper",role:"group","aria-labelledby":"interest_rate_label"},oe=["aria-label"],ae=["aria-label"],se={class:"result-section"},le={class:"result-card"},re={class:"estimated"},ne={class:"estimated-monthly-payment"},ie={class:"estimates-text"},ce={__name:"MortgageCalculator",props:{price:Number},setup(k){const r=i(k.price),l=i(r.value*.1),u=i(l.value/r.value*100),n=i(2),d=i(1),C=R(),{openContactDialog:y}=C,V=o=>o.toLocaleString(),h=()=>{const o=r.value||0,a=l.value||0;if(o===0){u.value=0;return}let t=a/o*100;t>100?(t=100,l.value=o):t<0&&(t=0,l.value=0),u.value=parseFloat(t.toFixed(2))};b(r,()=>{h()}),b(l,()=>{h()});const M=f(()=>{const o=r.value||0,a=l.value||0,t=o-a,m=d.value*12,p=n.value/1200;if(t<=0||m<=0)return 0;let _;return p===0?_=t/m:_=t*(p/(1-Math.pow(1+p,-m))),parseFloat(_.toFixed(2))}),D=f(()=>V(M.value)),I=()=>{n.value<100&&n.value++},P=()=>{n.value>0&&n.value--};return(o,a)=>(w(),$("div",U,[e("p",Y,s(o.$t("common.mortgage_calculator.title")),1),e("div",L,[e("div",j,[e("div",A,[e("label",E,s(o.$t("common.mortgage_calculator.property_price")),1),e("div",q,[g(c(v),{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=t=>r.value=t),inputId:"price","aria-label":"price"},null,8,["modelValue"]),e("span",z,s(o.$page.props.currency.code),1)])]),e("div",G,[e("label",H,s(o.$t("common.mortgage_calculator.down_payment")),1),e("div",J,[e("div",K,[g(c(v),{modelValue:l.value,"onUpdate:modelValue":a[1]||(a[1]=t=>l.value=t),inputId:"down_payment","aria-label":"down_payment"},null,8,["modelValue"]),e("span",O,s(o.$page.props.currency.code),1)]),e("div",Q,[g(c(v),{modelValue:u.value,"onUpdate:modelValue":a[2]||(a[2]=t=>u.value=t),inputId:"rate",readonly:"",suffix:"%"},null,8,["modelValue"])])])]),e("div",T,[e("label",W,s(o.$t("common.mortgage_calculator.mortgage_term")),1),B(e("select",{"onUpdate:modelValue":a[3]||(a[3]=t=>d.value=t),class:"w-full md:w-14rem",id:"mortgage_term","aria-label":"mortgage_term","aria-labelledby":"mortgage_term"},[(w(),$(x,null,N(10,t=>e("option",{key:t,value:t},s(o.$tChoice("common.mortgage_calculator.year",t,{count:t})),9,X)),64))],512),[[S,d.value]])]),e("div",Z,[e("label",ee,s(o.$t("common.mortgage_calculator.interest_rate")),1),e("div",te,[e("button",{class:"rate-btn",onClick:P,"aria-label":`${o.$t("common.mortgage_calculator.interest_rate")}: decrease`},[...a[5]||(a[5]=[e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","aria-hidden":"true"},[e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])],8,oe),e("p",null,s(n.value)+" %",1),e("button",{class:"rate-btn",onClick:I,"aria-label":`${o.$t("common.mortgage_calculator.interest_rate")}: increase`},[...a[6]||(a[6]=[e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","aria-hidden":"true"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])],8,ae)])])]),e("div",se,[e("div",le,[e("div",null,[e("p",re,s(o.$t("common.mortgage_calculator.your_estimated_monthly_payment")),1),e("p",ne,s(D.value)+" "+s(o.$page.props.currency.code),1)]),e("div",null,[e("button",{class:"consultation-btn",onClick:a[4]||(a[4]=(...t)=>c(y)&&c(y)(...t))}
1,s(o.$t("common.mortgage_calculator.get_free_consultation")),1),e("p",ie,s(o.$t("common.mortgage_calculator.estimates_text")),1)])])])])]))}},fe=F(ce,[["__scopeId","data-v-fdd0406b"]]);export{fe 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.