import{_ as d}from"./BasePage-C3DiNX0e.js";import{_ as c}from"./AddressForm-D5NP75jV.js";import{u,O as f}from"./index-_-ijfL1Q.js";import{l as y,r as l,k as r,f as g,h as k,o as C,w as v,a as _,u as b}from"./index-DRopsKkO.js";import"./USelect.vue_vue_type_script_setup_true_lang-BgoCOcXc.js";import"./ULabel.vue_vue_type_script_setup_true_lang-B9XE8rwf.js";import"./UDivider.vue_vue_type_script_setup_true_lang-CGxguuHo.js";import"./useMutationObserver-DtW-3lQD.js";import"./UInput.vue_vue_type_script_setup_true_lang-eIU5RwOc.js";const D={__name:"Page",setup(S){const a=u(),e=y({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":b(f)*4,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(()=>[_(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{D as default};
