const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-vue-tel-input-po4vDl8i.css","./Phone-uPZXRn64.css"])))=>i.map(i=>d[i]);
import{_ as l}from"./convert-case-to-camel-case.utils-CK5dBN7n.js";import{u as V}from"./appearanceStore-Cp-euDX2.js";import{u as E,v as T,q as A}from"./fieldsStore-CNpVuoPu.js";import{_ as D}from"./ProBadge.vue_vue_type_style_index_0_lang-DqDXUf8-.js";import{d as P,e as f,$ as c,f as s,i as r,x as d,t as a,z as q,j as R,k as S,v as g}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as x,r as B,u as t}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as p,a as F}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./settingsStore-8bwiLMEn.js";import"./appStore-CFAkQG2b.js";import"./translationsStore-D6vLzgNA.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";import"./callbackStore-BhxBUA6V.js";const I={class:"ccb-field__label"},L={class:"ccb-field__title"},N={key:0,class:"ccb-field-required-mark"},O={key:0,class:"ccb-field__hidden"},w={key:0,class:"ccb-field__descriptions ccb-before"},z={key:0,class:"ccb-field__description"},U={class:"ccb-field__input-wrapper"},$={key:1,class:"ccb-field__descriptions ccb-after"},j={key:0,class:"ccb-field__description"},ae=P({__name:"ValidationForm",props:{field:{}},setup(v){const b=v,{field:e}=x(b),n=B(""),_=V(),u=E(),y=f(()=>{var o;const i=((o=e.value)==null?void 0:o.fieldType)||"email";return i==="name"?c(()=>l(()=>import("./Name-BfPjGEi2.js"),[],import.meta.url)):i==="email"?c(()=>l(()=>import("./Email-BzZr1Riv.js"),[],import.meta.url)):i==="phone"?c(()=>l(()=>import("./Phone-BX_ZrOeX.js"),__vite__mapDeps([0,1]),import.meta.url)):i==="website_url"?c(()=>l(()=>import("./WebsiteUrl-CvpZf1hE.js"),[],import.meta.url)):""}),h=i=>{var o,m;n.value="",((o=e.value)==null?void 0:o.fieldType)==="email"&&!T(i)&&i.trim()!==""?n.value="invalid_email":((m=e.value)==null?void 0:m.fieldType)==="website_url"&&!A(i)&&i.trim()!==""&&(n.value="invalid_url"),e.value.displayValue=i,u.updateField(e.value.alias,e.value)},C=i=>{e.value.defaultCountry=i,u.updateField(e.value.alias,e.value)},k=f(()=>"");return(i,o)=>(r(),s("div",{class:F(["ccb-field ccb-field-quantity ccb-field-form-fields",{"ccb-field-disabled":t(e).disabled,[k.value]:!0}])},[d("div",I,[d("div",L,[q(p(t(e).label),1),t(e).required?(r(),s("span",N,"*")):a("",!0),R(D)]),t(e).hidden?(r(),s("div",O,o[0]||(o[0]=[d("i",{class:"ccb-icon-ic_eye_crossed"},null,-1)]))):a("",!0)]),t(_).getAppearanceDescriptionPosition==="before"?(r(),s("div",w,[t(e).description?(r(),s("div",z,p(t(e).description),1)):a("",!0)])):a("",!0),d("div",U,[(r(),S(g(y.value),{onUpdate:h,field:t(e),onCountryChanged:C},null,40,["field"]))]),t(_).getAppearanceDescriptionPosition==="after"?(r(),s("div",$,[t(e).description?(r(),s("div",j,p(t(e).description),1)):a("",!0)])):a("",!0)],2))}});export{ae as default};
//# sourceMappingURL=ValidationForm-C6F-DTqh.js.map
