import{K as l}from"./vendor-phone.19272b37.js";import"./app-core.3e3b5f4b.js";import{_ as p}from"./_plugin-vue_export-helper.eefbdd86.js";import{d as m,_ as r}from"./vendor-other.ac1169a2.js";import{aq as c,f as d,Q as f,P as _}from"./vendor-vue-ui.65fbb3e9.js";import"./vendor-lodash.a7229f96.js";const i="all-in-one-seo-pack",h={emits:["inputFormatted","update:modelValue"],components:{VueTelInput:l},props:{modelValue:String},data(){return{phoneNumber:this.modelValue,isInvalidNumber:!1,isValidNumber:!1,userInteracted:!1,inputOptions:{placeholder:r("Phone number",i)},dropdownOptions:{showDialCodeInList:!0,showDialCodeInSelection:!0,showFlags:!0,showSearchBox:!0,searchBoxPlaceholder:r("Search",i)}}},methods:{onInput(n,e){if(!this.userInteracted)return;if(this.isInvalidNumber=!1,this.isValidNumber=!1,e.valid){this.isValidNumber=!0,e.countryCallingCode&&e.nationalNumber&&this.$emit("inputFormatted","+"+e.countryCallingCode+" "+e.nationalNumber),this.$emit("update:modelValue",e.number);return}4<(n||"").replace(/\D/g,"").length&&(this.isInvalidNumber=!0),n||this.$emit("update:modelValue","")}},mounted(){setTimeout(()=>{this.userInteracted=!0},500);const e="aioseo-phone-number-"+String(m().valueOf());document.querySelectorAll(".aioseo-phone-number input").forEach(o=>{o.setAttribute("autocomplete",e)})}};function N(n,e,o,b,t,s){const u=c("vue-tel-input");return d(),f(u,{class:_(["aioseo-phone-number",{invalidNumber:t.isInvalidNumber,validNumber:t.isValidNumber}]),modelValue:t.phoneNumber,"onUpdate:modelValue":e[0]||(e[0]=a=>t.phoneNumber=a),mode:"national","preferred-countries":["US","GB","CA","AU","JP","RU","IN","TR","BR","MX"],"ignored-countries":["KP"],"input-options":t.inputOptions,"dropdown-options":t.dropdownOptions,"valid-characters-only":!0,"auto-default-country":!0,"strict-validation":!0,onOnInput:s.onInput},null,8,["class","modelValue","input-options","dropdown-options","onOnInput"])}const w=p(h,[["render",N]]);export{w as default};
