1import{d as a,ax as n,m as l,a as s,n as i}from"./app-85945816.js";/* empty css */const c={mixins:[a],components:{VuePhoneNumberInput:n},data(){return{form_method:"put",baseUrl:"/account/update-phone",localCache:{phone:"",country_code:1},inputs:{phone:""}}},computed:{...l("user",{profile:o=>o.record.profile})},methods:{...s("user",["initUser"]),...s("modals",["hideModal"]),async preProcess(){let o="+".concat(this.localCache.country_code," ").concat(this.localCache.phone);if(this.localCache.phone.length<3){this.form.withErrors({phone:["Field is required"]});return}if(!o){this.form.withErrors({phone:["failed to parse input"]});return}this.form.populate({phone:o})},async onSuccess(){await this.initUser(!0),await this.hideModal()},setCountryCode(o){this.localCache.country_code=o},formPostInitHook(){this.localCache={phone:this.profile.phone,country_code:this.profile.country_code}}}};var p=function(){var e=this,t=e._self._c;return t("div",[t("h2",{staticClass:"flex items-center"},[e._v("Update Phone Number")]),e._v(" "),e.form?t("form",{staticClass:"flex flex-col",on:{submit:function(r){return r.preventDefault(),e.submitForm.apply(null,arguments)}}},[t("div",{staticClass:"flex flex-col"},[t("div",{staticClass:"flex"},[t("vue-phone-number-input",{class:["w-full"],attrs:{id:"phone",placeholder:"phone",error:e.form.errors.has("phone"),required:!0},on:{update:function(r){return e.form.errors.clear("phone")},countryCode:e.setCountryCode,enter:e.submitForm},model:{value:e.localCache.phone,callback:function(r){e.$set(e.localCache,"phone",r)},expression:" localCache.phone "}})],1),e._v(" "),e.hasFormValidationErrors?t("p",{staticClass:"text-center",staticStyle:{color:"#BB0719"}},[e._v(e._s(e.formValidationErrors))]):e._e()]),e._v(" "),t("div",{staticClass:"flex justify-center mt-4"},[t("busy-button",{attrs:{button_classes:"w-btn w-btn-grey-solid",busy:e.form.processing,button_type:"button"},on:{click:e.submitForm}},[e._v("\n update\n ")])],1),e._v(" "),e.hasFormValidationErrors?t("div",{staticClass:"flex flex-col note-box danger"},[t("div",{staticClass:"text-center"},[e._v("Error saving. Please try again or contact "),t("a",{attrs:{href:"mailto:".concat(e.$page.props.email_webmaster)}},[e._v(e._s(e.$page.props.email_webmaster))])])]):e._e()]):e._e()])},u=[],h=i(c,p,u,!1,null,"67d2cfbe",null,null);const m=h.exports;export{m 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.