1import{_ as $}from"./B8pfZ2vy.js";import{_ as L}from"./DwJLCTz3.js";import{f as O,x as b,e as D,k as H,bh as F,bL as M,h as p,aH as U,g as K,cd as R,dj as h,dk as Y,dl as G}from"./aLrIR-cP.js";import{_ as W}from"./0y-DGERM.js";import{C as j,b as i,w as Q,Q as X,e as Z,$ as d,d as q,Z as u,a5 as f,Y as z,B as t,X as l,l as J,ai as ee,ak as te,E as ae}from"./D2PenvMZ.js";import{b5 as oe,b6 as se}from"./BBGT4EBI.js";import{u as ne}from"./CDohe6EK.js";import"./CN5T0Qha.js";import"./Lw3U55bO.js";import"./B98lbH4P.js";import"./Bc5JSocz.js";import"./BWhgzynv.js";import"./DQUCbd5I.js";import"./Chg02ahA.js";import"./B0CKu3b7.js";import"./Hzq2TwJG.js";const re={class:"sm: col-span-4 sm:col-start-2 lg:col-start-3 xl:col-start-5"},ie={class:"col-span-4 pt-sp4 sm:col-start-2 desktop:pt-sp5 lg:col-start-3 xl:col-start-5"},le={class:"text-center text-amc-gray-900"},Te=j({__name:"phone",setup(ce){O({title:se,meta:[{name:"description",content:oe}]});const o=b(),w=D(),v=H("main"),N=new F(v),P=o.getPrimaryBorrower()?.name?.firstName??"",k=!!o.getOfferCode(),y=new M(v),x=i(),s=i(o.getPhoneNumber()),a=ae(()=>s.value?.replaceAll(/[^0-9]*/g,"")),c=i(!1),n=i(!1),m=i(!1),{loading:T,wrapForAutoLoadingWithArgs:V}=ne();Q(s,(r,e)=>{r!=e&&m.value&&n.value&&(m.value=!1,n.value=!1)});const g=V(async r=>{if(!a.value||a.value.length!==10){c.value=!0;return}const e={phoneNumber:a.value,verifyPhoneNumberForAuth:!1};if(!(await N.validatePhoneInput(e)).valid){c.value=!0,m.value=!0,n.value=!0;return}return await o.for(h).updateDb({phoneNumber:a.value}),w.pushCtaClickEvent({ctaName:"NextStep"}),o.isPhoneVerified(a.value)?Y({pageId:h.id}):p().$navigate.to(G)});function E(){p().$navigate.back()}return X(async()=>{p().$trackingInfo()?.sourceId===U&&y.getPayout(b().getTransactionType()??"").then(r=>{x.value=r?.payout})}),(r,e)=>{const _=$,I=L,S=R,B=W,C=K;return q(),Z(C,{class:"auto-rows-min"},{default:d(()=>[u(_,{class:"col-span-full mx-auto text-center lg:w-full"},{innerText:d(()=>[f(z(k?`${t(P)}, verify`:"Verify")+" your identity ",1),e[1]||(e[1]=l("br",{class:"sm:hidden"},null,-1)),e[2]||(e[2]=f("by providing your ",-1)),e[3]||(e[3]=l("span",{class:"whitespace-nowrap"}," mobile number",-1))]),_:1}),l("div",re,[u(I,{label:"Mobile Number",onKeydown:ee(te(t(g),["prevent"]),["enter"]),modelValue:t(s),"onUpdate:modelValue":e[0]||(e[0]=A=>J(s)?s.value=A:null),valid:t(c)?!!t(a)&&t(a).length===10&&!t(n):void 0,"err-msg":t(c)&&t(n)?"We are unable to send a verification code":void 0},null,8,["onKeydown","modelValue","valid","err-msg"])]),u(B,{"button-text":"Text Verification Code","button-arrow":!1,"on-next-click":t(g),class:"col-span-4 row-start-6 sm:col-start-2 lg:col-start-3 xl:col-start-5","allow-back-navigation":!1,onBackClicked:E,loading:t(T)},{innerNavButtons:d(()=>[l("div",ie,[l("p",le,[e[4]||(e[4]=f(" You can also call us at ",-1)),u(S,{"phone-link-id":"mainPhonePagePhoneLinkId"})])])]),_:1},8,["on-next-click","loading"])]),_:1})}}});
1export{Te 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.