1import{s as D}from"./DfqSKS0D.js";import{e as z,s as F,r as l,l as G,y as H,c as m,a as e,t as a,f as R,d as v,u as n,n as h,g as U,p as j,i as y,b as q,w,h as E,o as _}from"./DjZ-sZ2p.js";import{_ as L}from"./BLKEGSo9.js";import{a as J,u as K,r as O}from"./N5wYXHjs.js";import{t as Q}from"./BwIAxti6.js";import"./Bh5lTP-q.js";import"./Dj8QPfbg.js";import"./DK93PiIU.js";import"./B-byeB6J.js";const W={class:"container"},X={class:"layout-form custom-width"},Y={class:"main-title bold lg mb-5"},Z={class:"row"},P={class:"col-12 col-md-8 mr-auto"},ee={class:"text-center mb-5"},se={class:"main-title"},te={class:"form-group"},oe={class:"label"},ae={class:"main_input with_icon"},le=["type","placeholder"],ne={class:"form-group"},ie={class:"label"},re={class:"with_cun_select"},ue={class:"main_input"},ce=["placeholder"],de={class:"card d-flex justify-content-center dropdown_card"},pe={key:0,class:"flex-group-me"},me=["alt","src"],_e={key:1},ve={class:"flex-group-me"},he=["alt","src"],fe={class:"custom-btn w-100 mr-auto mt-5"},ge={key:0,class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},Ie={__name:"changeMobileNumber",setup(be){const{t:k}=z({useScope:"global"}),{response:$}=O(),{successToast:V,errorToast:f}=Q(),g=J(),{token:A}=F(g),x=K(),c=l(""),b=l(null),i=l({}),r=l([]),d=l(!1),u=l(!1),p=l([]),{phoneHandler:C}=g,T=t=>{d.value=!d.value},I=G(()=>d.value?"text":"password");function M(){let t=document.querySelectorAll(".validInputs");for(let s=0;s<t.length;s++)t[s].value===""&&p.value.push(k(`validation.${t[s].name}`))}`${A.value}`;const N=async()=>{u.value=!0;const t=new FormData(b.value);if(t.append("country_code",i.value.key),M(),p.value.length)f(p.value[0]),u.value=!1,p.value=[];else{u.value=!0;const s=await C(t,c.value);s.status=="success"?V(s.msg):f(s.msg),u.value=!1}},S=async()=>{await x.get("countries").then(t=>{if($(t)=="success"){r.value=t.data.data;for(let s=0;s<r.value.length;s++)r.value[s].id==1&&(i.value=r.value[s])}}).catch(t=>console.log(t))};return H(async()=>{await S()}),(t,s)=>{const B=D;return _(),m("div",null,[e("div",W,[e("div",X,[e("h1",Y,a(t.$t("Global.change_mobile_number")),1),e("form",{onSubmit:R(N,["prevent"]),ref_key:"changePhoneForm",ref:b},[e("div",Z,[e("div",P,[e("div",ee,[s[2]||(s[2]=e("img",{src:L,loading:"lazy",alt:"restore-image",class:"restore-image mb-4"},null,-1)),e("p",se,a(t.$t("Global.enter_current_password_new_mobile")),1)]),e("div",te,[e("label",oe,[v(a(t.$t("Auth.password"))+" ",1),s[3]||(s[3]=e("span",{class:"hint-red"},"*",-1))]),e("div",ae,[e("input",{type:n(I),name:"password",class:"custum-input-icon validInputs",valid:"password",placeholder:t.$t("Auth.please_enter_password")},null,8,le),e("button",{class:h(["static-btn with_eye",{active_class:n(d)}]),type:"button",onClick:T},s[4]||(s[4]=[e("i",{class:"far fa-eye icon"},null,-1)]),2)])]),e("div",ne,[e("label",ie,[v(a(t.$t("Global.new_mobile"))+" ",1),s[5]||(s[5]=e("span",{class:"hint-red"},"*",-1))]),e("div",re,[e("div",ue,[s[6]||(s[6]=e("i",{class:"fas fa-mobile-alt sm-icon"},null,-1)),U(e("input",{type:"number",class:"custum-input-icon validInputs",valid:"phone",name:"phone","onUpdate:modelValue":s[0]||(s[0]=o=>y(c)?c.value=o:null),placeholder:t.$t("Auth.please_mobile_number")},null,8,ce),[[j,n(c)]])]),e("div",de,[q(B,{modelValue:n(i),"onUpdate:modelValue":s[1]||(s[1]=o=>y(i)?i.value=o:null),options:n(r),optionLabel:"name"},{value:w(o=>[o.value?(_(),m("div",pe,[e("img",{alt:o.value.label,src:o.value.image,class:h(`mr-2 flag flag-${o.value.key}`),style:{width:"24px"}},null,10,me),e("div",null,a(o.value.key),1)])):(_(),m("span",_e,a(o.placeholder),1))]),option:w(o=>[e("div",ve,[e("img",{alt:o.option.label,src:o.option.image,class:h(`mr-2 flag flag-${o.option.key}`),style:{width:"24px"}},null,10,he),e("div",null,a(o.option.key),1)])]),_:1},8,["modelValue","options"])])])]),e("button",fe,[v(a(t.$t("Home.continuation"))+" ",1),n(u)?(_(),m("span",ge)):E("",!0)])])])],544)])])])}}};export{Ie 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.