import{a as d}from"./BasePage-aJlR_RJI.js";import{_ as c}from"./AddressForm-C-6JNukl.js";import{u,O as y}from"./index-DruWBKkm.js";import{j as f,r as l,g as r,k as g,h as k,o as C,w as v,a as b,u as S}from"./index-CdEV5Lsj.js";import"./USelect.vue_vue_type_script_setup_true_lang-Cw4e8KSA.js";import"./ULabel.vue_vue_type_script_setup_true_lang-DmdMPZfT.js";import"./UDivider.vue_vue_type_script_setup_true_lang-CBOjoWJ-.js";import"./UInput.vue_vue_type_script_setup_true_lang-BjaSJgmr.js";const A={__name:"Page",setup(_){const a=u(),e=f({accountName:"",address:"",city:"",state:"",zipCode:""}),s=l([]),o=r(()=>{let t=2;return a.payments.mailin.isActive&&(t=3),t}),p=r(()=>{var t;return!e.accountName||!e.address||!e.city||!e.zipCode||((t=s.value)==null?void 0:t.length)>0&&!e.state});g(async()=>{var t;a.hasCompanyData||await a.getCompany(),a.hasPaymentData||await a.getPayments(),s.value=a.statesForSelectedCountry,e.state=((t=s.value)==null?void 0:t.length)&&(a.payments.banktransfer.params.state||a.company.address.state||""),e.accountName=a.payments.banktransfer.params.accountName,e.address=a.payments.banktransfer.params.address||a.company.address.streetAddress,e.city=a.payments.banktransfer.params.city||a.company.address.city,e.zipCode=a.payments.banktransfer.params.zipCode||a.company.address.zip});function m(t){var n;a.payments.banktransfer.params.accountName=e.accountName,a.payments.banktransfer.params.address=e.address,a.payments.banktransfer.params.city=e.city,a.payments.banktransfer.params.state=(n=s.value)!=null&&n.length?e.state:"",a.payments.banktransfer.params.zipCode=e.zipCode,t()}return(t,n)=>(C(),k(d,{group:t.$t("group.payments"),"group-step":S(y)*3,title:t.$t("title.wireTransfers"),description:t.$t("pageDescription.wireTransfers"),step:1,"max-steps":o.value,"prevent-next":p.value,prev:{name:"GettingStarted/Payments/Step1"},next:{name:"GettingStarted/Payments/Step3"},onContinue:m},{default:v(()=>[b(c,{modelValue:e,"onUpdate:modelValue":n[0]||(n[0]=i=>e=i),states:s.value},null,8,["modelValue","states"])]),_:1},8,["group","group-step","title","description","max-steps","prevent-next"]))}};export{A as default};
