import{y as w,D as g,I as E,o as c,e as z,J as S,m as h,ae as k,f,n as p,C as $,t as j,v as d}from"./vendor-CI5NvTnj.js";class V{localePattern(t,e){var l,o;return((o=(l=[{type:"phone",locales:[{locale:"cs",pattern:"^\\s*(\\d\\s*){9}$"},{locale:"sk",pattern:"^\\s*(\\d\\s*){9,10}$"},{locale:"pl",pattern:"^\\s*(\\d\\s*){9}$"},{locale:"ro",pattern:"^\\s*(\\d\\s*){9,10}$"},{locale:"hu",pattern:"^\\s*(\\d\\s*){9}$"},{locale:"de",pattern:"^\\s*(\\d\\s*){9,13}$"}]},{type:"psc",locales:[{locale:"cs",pattern:"^\\s*(\\d\\s*){5}$"},{locale:"sk",pattern:"^\\s*(\\d\\s*){5}$"},{locale:"pl",pattern:"^\\d{2}-\\d{3}$"},{locale:"ro",pattern:"^\\s*(\\d\\s*){6}$"},{locale:"hu",pattern:"^\\s*(\\d\\s*){4}$"},{locale:"de",pattern:"^\\s*(\\d\\s*){5}$"}]},{type:"ico",locales:[{locale:"cs",pattern:"^\\s*\\d{8}\\s*$"},{locale:"sk",pattern:"^\\s*\\d{8}\\s*$"},{locale:"pl",pattern:"^s*(d{9}|d{14})s*$"},{locale:"ro",pattern:"^s*(RO)?d{2,10}s*$"},{locale:"hu",pattern:"^\\s*\\d{2}-\\d{2}-\\d{6}\\s*$"},{locale:"de",pattern:"^\\s*\\d{2}/\\d{3}/\\d{5}\\s*$"}]}].find(s=>s.type===e))==null?void 0:l.locales.find(s=>s.locale===t))==null?void 0:o.pattern)||void 0}pattern(t,e){switch(e){case"email":return"^[\\w\\-\\.\\+]+@([\\w\\-]+\\.)+[\\w\\-]{2,30}$";case"ico":return this.localePattern(t,"ico");case"dic":return"^[A-Za-z]{2,3}[A-Za-z0-9]{2,12}$";case"street":return"^(?=.*\\d)(?=.*\\s)(?=.*[a-zA-Z]).+$";case"psc":return this.localePattern(t,"psc");case"phone":return this.localePattern(t,"phone");case"variableSymbol":return"^\\d{10}$";case"password":return"^.{8,}$";default:return""}}}const C=new V;function y(r){const t=r;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{cs:{dicExample:e=>{const{normalize:n}=e;return n(["CZ27767680"])},dicFillRight:e=>{const{normalize:n}=e;return n(["je kĂłd zemÄ› a 10 ÄŤĂslic"])},emailFillRight:e=>{const{normalize:n}=e;return n(["obsahuje ","@"," a .cz/.com atd."])},example:e=>{const{normalize:n}=e;return n(["napĹ™.:"])},fillRightGeneral:e=>{const{normalize:n}=e;return n(["VyplĹte prosĂm toto pole"])},icoExample:e=>{const{normalize:n}=e;return n(["12345678"])},icoFillRight:e=>{const{normalize:n}=e;return n(["je 8 ÄŤĂslic"])},passwordMsg:e=>{const{normalize:n}=e;return n(["Heslo musĂ mĂt alespoĹ 8 znakĹŻ"])},phoneExample:e=>{const{normalize:n}=e;return n(["123 456 789"])},phoneFillRight:e=>{const{normalize:n}=e;return n(["je 9 ÄŤĂslic"])},pleaseFill:e=>{const{normalize:n}=e;return n(["SprávnĂ˝ tvar"])},pleaseFillRight:e=>{const{normalize:n}=e;return n(["ProsĂm, zadejte správnĂ˝ tvar"])},pscExample:e=>{const{normalize:n}=e;return n(["123 45"])},pscFillRight:e=>{const{normalize:n}=e;return n(["je 5 ÄŤĂslic"])},streetExample:e=>{const{normalize:n}=e;return n(["Ulice 123"])},streetFillRight:e=>{const{normalize:n}=e;return n(["je název ulice + ÄŤĂslo domu"])},variableSymbolExample:e=>{const{normalize:n}=e;return n(["1234567890"])},variableSymbolFillRight:e=>{const{normalize:n}=e;return n(["je 10 ÄŤĂslic"])}},sk:{dicExample:e=>{const{normalize:n}=e;return n(["SK27767680"])},dicFillRight:e=>{const{normalize:n}=e;return n(["je kĂłd krajiny a 8 ÄŤĂslic"])},emailFillRight:e=>{const{normalize:n}=e;return n(["obsahuje ","@"," a .sk/.com atÄŹ."])},example:e=>{const{normalize:n}=e;return n(["napr.:"])},fillRightGeneral:e=>{const{normalize:n}=e;return n(["VyplĹte prosĂm toto pole"])},icoExample:e=>{const{normalize:n}=e;return n(["12345678"])},icoFillRight:e=>{const{normalize:n}=e;return n(["je 9 ÄŤĂslic"])},passwordMsg:e=>{const{normalize:n}=e;return n(["Heslo musĂ maĹĄ aspoĹ 8 znakov"])},phoneExample:e=>{const{normalize:n}=e;return n(["123 456 789"])},phoneFillRight:e=>{const{normalize:n}=e;return n(["je 9 - 10 ÄŤĂslic"])},pleaseFill:e=>{const{normalize:n}=e;return n(["Správny tvar"])},pleaseFillRight:e=>{const{normalize:n}=e;return n(["ProsĂm, zadajte správny tvar"])},pscExample:e=>{const{normalize:n}=e;return n(["123 45"])},pscFillRight:e=>{const{normalize:n}=e;return n(["je 5 ÄŤĂslic"])},streetExample:e=>{const{normalize:n}=e;return n(["Ulica 123"])},streetFillRight:e=>{const{normalize:n}=e;return n(["je názov ulice + ÄŤĂslo domu"])},variableSymbolExample:e=>{const{normalize:n}=e;return n(["1234567890"])},variableSymbolFillRight:e=>{const{normalize:n}=e;return n(["je 10 ÄŤĂslic"])}},pl:{dicExample:e=>{const{normalize:n}=e;return n(["PL123-456-32-18"])},dicFillRight:e=>{const{normalize:n}=e;return n(["to kod kraju i 8 cyfr"])},emailFillRight:e=>{const{normalize:n}=e;return n(["zawiera ","@"," a .pl/.com itp."])},example:e=>{const{normalize:n}=e;return n(["np:"])},fillRightGeneral:e=>{const{normalize:n}=e;return n(["Podaj"])},icoExample:e=>{const{normalize:n}=e;return n(["123456789101"])},icoFillRight:e=>{const{normalize:n}=e;return n(["to 9 cyfr"])},passwordMsg:e=>{const{normalize:n}=e;return n(["HasĹ‚o musi skĹ‚adać siÄ™ z co najmniej 8 znakĂłw"])},phoneExample:e=>{const{normalize:n}=e;return n(["123 456 789"])},phoneFillRight:e=>{const{normalize:n}=e;return n(["to 9 cyfr"])},pleaseFill:e=>{const{normalize:n}=e;return n(["PrawidĹ‚owy format"])},pleaseFillRight:e=>{const{normalize:n}=e;return n(["WprowadĹş prawidĹ‚owy format"])},pscExample:e=>{const{normalize:n}=e;return n(["99-999"])},pscFillRight:e=>{const{normalize:n}=e;return n(["to 6 znakĂłw"])},streetExample:e=>{const{normalize:n}=e;return n(["Ulica 12/34"])},streetFillRight:e=>{const{normalize:n}=e;return n(["nazwÄ™ ulicy + numer domu/mieszkania"])},variableSymbolExample:e=>{const{normalize:n}=e;return n(["1234567890"])},variableSymbolFillRight:e=>{const{normalize:n}=e;return n(["to 10 cyfr"])}},hu:{dicExample:e=>{const{normalize:n}=e;return n(["CZ27767680"])},dicFillRight:e=>{const{normalize:n}=e;return n(["ország kĂłdja Ă©s 8 számjegy"])},emailFillRight:e=>{const{normalize:n}=e;return n(["tartalmazza a ","@"," .cz/.com stb."])},example:e=>{const{normalize:n}=e;return n(["pl.:"])},fillRightGeneral:e=>{const{normalize:n}=e;return n(["KĂ©rjĂĽk, töltse ki ezt a mezĹ‘t"])},icoExample:e=>{const{normalize:n}=e;return n(["12345678"])},icoFillRight:e=>{const{normalize:n}=e;return n(["9 számjegy"])},passwordMsg:e=>{const{normalize:n}=e;return n(["A jelszĂłnak legalább 8 karakterbĹ‘l kell állnia"])},phoneExample:e=>{const{normalize:n}=e;return n(["123 456 789"])},phoneFillRight:e=>{const{normalize:n}=e;return n(["9 számjegy"])},pleaseFill:e=>{const{normalize:n}=e;return n(["Helyes formátum"])},pleaseFillRight:e=>{const{normalize:n}=e;return n(["KĂ©rjĂĽk, Ărja be a helyes formátumot!"])},pscExample:e=>{const{normalize:n}=e;return n(["123 45"])},pscFillRight:e=>{const{normalize:n}=e;return n(["5 számjegy"])},streetExample:e=>{const{normalize:n}=e;return n(["Utca 123"])},streetFillRight:e=>{const{normalize:n}=e;return n(["utca nĂ©v + házszám"])},variableSymbolExample:e=>{const{normalize:n}=e;return n(["1234567890"])},variableSymbolFillRight:e=>{const{normalize:n}=e;return n(["10 számjegyű"])}},de:{dicExample:e=>{const{normalize:n}=e;return n(["CZ27767680"])},dicFillRight:e=>{const{normalize:n}=e;return n(["ist die Landesvorwahl und 8 Ziffern"])},emailFillRight:e=>{const{normalize:n}=e;return n(["@"," umfasst und .de/.com usw."])},example:e=>{const{normalize:n}=e;return n(["z.B.:"])},fillRightGeneral:e=>{const{normalize:n}=e;return n(["Bitte fĂĽlle dieses Feld aus"])},icoExample:e=>{const{normalize:n}=e;return n(["12345678"])},icoFillRight:e=>{const{normalize:n}=e;return n(["sind 9 Ziffern"])},passwordMsg:e=>{const{normalize:n}=e;return n(["Das Passwort muss mindestens 8 Zeichen lang sein."])},phoneExample:e=>{const{normalize:n}=e;return n(["123 456 789"])},phoneFillRight:e=>{const{normalize:n}=e;return n(["sind 9 Ziffern"])},pleaseFill:e=>{const{normalize:n}=e;return n(["Korrekte Form"])},pleaseFillRight:e=>{const{normalize:n}=e;return n(["Bitte gib die korrekte Form ein"])},pscExample:e=>{const{normalize:n}=e;return n(["12 345"])},pscFillRight:e=>{const{normalize:n}=e;return n(["ist 5-stellig"])},streetExample:e=>{const{normalize:n}=e;return n(["StraĂźe 123"])},streetFillRight:e=>{const{normalize:n}=e;return n(["ist der StraĂźenname + Hausnummer"])},variableSymbolExample:e=>{const{normalize:n}=e;return n(["1234567890"])},variableSymbolFillRight:e=>{const{normalize:n}=e;return n(["ist 10 Ziffern"])}},at:{dicExample:e=>{const{normalize:n}=e;return n(["CZ27767680"])},dicFillRight:e=>{const{normalize:n}=e;return n(["ist die Landesvorwahl und 8 Ziffern"])},emailFillRight:e=>{const{normalize:n}=e;return n(["@"," umfasst und .de/.com usw."])},example:e=>{const{normalize:n}=e;return n(["z.B.:"])},fillRightGeneral:e=>{const{normalize:n}=e;return n(["Bitte fĂĽlle dieses Feld aus"])},icoExample:e=>{const{normalize:n}=e;return n(["12345678"])},icoFillRight:e=>{const{normalize:n}=e;return n(["sind 9 Ziffern"])},passwordMsg:e=>{const{normalize:n}=e;return n(["Das Passwort muss mindestens 8 Zeichen lang sein."])},phoneExample:e=>{const{normalize:n}=e;return n(["123 456 789"])},phoneFillRight:e=>{const{normalize:n}=e;return n(["sind 9 Ziffern"])},pleaseFill:e=>{const{normalize:n}=e;return n(["Korrekte Form"])},pleaseFillRight:e=>{const{normalize:n}=e;return n(["Bitte gib die korrekte Form ein"])},pscExample:e=>{const{normalize:n}=e;return n(["12 345"])},pscFillRight:e=>{const{normalize:n}=e;return n(["ist 5-stellig"])},streetExample:e=>{const{normalize:n}=e;return n(["StraĂźe 123"])},streetFillRight:e=>{const{normalize:n}=e;return n(["ist der StraĂźenname + Hausnummer"])},variableSymbolExample:e=>{const{normalize:n}=e;return n(["1234567890"])},variableSymbolFillRight:e=>{const{normalize:n}=e;return n(["ist 10 Ziffern"])}},ro:{dicExample:e=>{const{normalize:n}=e;return n(["RO27767680"])},dicFillRight:e=>{const{normalize:n}=e;return n(["este codul Č›Ärii Č™i 8 cifre"])},emailFillRight:e=>{const{normalize:n}=e;return n(["conĹŁine","@"," Č™i .ro/.com etc."])},example:e=>{const{normalize:n}=e;return n(["de exemplu:"])},fillRightGeneral:e=>{const{normalize:n}=e;return n(["VÄ rugÄm sÄ completaČ›i acest câmp"])},icoExample:e=>{const{normalize:n}=e;return n(["12345678"])},icoFillRight:e=>{const{normalize:n}=e;return n(["este de 9 cifre"])},passwordMsg:e=>{const{normalize:n}=e;return n(["Parola trebuie sÄ aibÄ cel puČ›in 8 caractere"])},phoneExample:e=>{const{normalize:n}=e;return n(["123 456 789"])},phoneFillRight:e=>{const{normalize:n}=e;return n(["este de 9 cifre"])},pleaseFill:e=>{const{normalize:n}=e;return n(["Forma corectÄ"])},pleaseFillRight:e=>{const{normalize:n}=e;return n(["VÄ rugÄm sÄ introduceČ›i forma corectÄ"])},pscExample:e=>{const{normalize:n}=e;return n(["123 456"])},pscFillRight:e=>{const{normalize:n}=e;return n(["este de 6 cifre"])},streetExample:e=>{const{normalize:n}=e;return n(["Strada 123"])},streetFillRight:e=>{const{normalize:n}=e;return n(["este numele strÄzii + numÄrul clÄdirii"])},variableSymbolExample:e=>{const{normalize:n}=e;return n(["1234567890"])},variableSymbolFillRight:e=>{const{normalize:n}=e;return n(["este de 10 cifre"])}}}})}const N=["id","value","type","inputmode","autocomplete","name","aria-label","required","pattern","maxlength","minlength","max","min","readonly"],Z=["for"],I={key:0,class:"text-danger"},B={__name:"BaseInputBox",props:{modelValue:{type:String,default:""},inputId:{type:String,required:!0},inputType:{type:String,required:!0},required:{type:Boolean,default:!1},inputWrapClasses:{type:String,default:""},inputClasses:{type:String,default:""},inputPattern:{type:String,default:".*"},inputLabel:{type:String,default:""},ariaLabel:{type:String,default:""},inputMode:{type:String,default:""},autoComplete:{type:String,default:""},inputHelper:{type:String,default:""},readOnly:{type:Boolean,default:!1},inputValidation:{type:String,default:""},maxLength:{type:[String,Number],default:""},minLength:{type:[String,Number],default:""},maxNumber:{type:[String,Number],default:""},minNumber:{type:[String,Number],default:""}},emits:["onChange","update:modelValue"],setup(r,{emit:t}){const{t:e,te:n}=w(),l=r,o=g(!1),s=g(!1),m=g(!0),b="sk",x=()=>l.inputType==="password"?`${e("passwordMsg")}`:l.modelValue===""&&l.required?`${e("fillRightGeneral")}`:l.inputValidation?`${e("pleaseFill")} ${e(`${l.inputValidation}FillRight`)}${n(`${l.inputValidation}Example`)===!0||l.inputValidation!=="email"?` (${e("example")} ${e(`${l.inputValidation}Example`)})`:""}`:e("pleaseFillRight"),F=a=>{a.target.value.length>0?o.value=!0:o.value=!1},u=t;E(()=>l.modelValue?o.value=!0:o.value=!1);const R=a=>{a.target.matches(":invalid:not(fieldset)")?m.value=!1:m.value=!0,u("update:modelValue",a.target.value)},v=a=>{if(l.inputType==="number"){const i=parseInt(a.target.value);l.minNumber&&i<parseInt(l.minNumber)&&(a.target.value=l.minNumber,u("update:modelValue",a.target.value)),l.maxNumber&&i>parseInt(l.maxNumber)&&(a.target.value=l.maxNumber,u("update:modelValue",a.target.value))}};return(a,i)=>(c(),z("div",{class:p(["form-group relative",r.inputWrapClasses])},[S(f("input",{id:r.inputId,value:r.modelValue,type:r.inputType==="password"?s.value===!0?"text":"password":r.inputType,class:p(["form-control form-control-lg rounded-sm shadow-none",[r.inputClasses,{"input-password-pr":r.inputType==="password"}]]),inputmode:r.inputMode||null,autocomplete:r.autoComplete,name:r.inputId,"aria-label":r.ariaLabel||null,required:r.required,pattern:h(C).pattern(h(b),r.inputType==="password"?"password":r.inputValidation)||null,maxlength:r.maxLength||null,minlength:r.minLength||null,max:r.maxNumber||null,min:r.minNumber||null,readonly:r.readOnly||null,placeholder:" ",onInput:R,onChange:i[0]||(i[0]=_=>u("onChange")),onBlur:F,onKeyup:v,onInvalid:i[1]||(i[1]=_=>m.value=!1)},null,42,N),[[h(k),{theme:"inputTooltip",content:x(),shown:!m.value,triggers:[]},void 0,{"top-end":!0}]]),r.inputLabel.length>0?(c(),z("label",{key:0,for:r.inputId,class:p(["label-animated absolute position-centered-vertical px-2 m-0 text-muted bg-white ml-2 rounded-sm",{"label-active":o.value===!0}])},[$(j(r.inputLabel)+" ",1),r.required?(c(),z("span",I,"*")):d("",!0)],10,Z)):d("",!0),d("",!0),r.inputType==="password"?(c(),z("button",{key:2,type:"button",class:"absolute position-right bg-transparent border-0 outline-none toggle-password-visibility mr-2",onClick:i[2]||(i[2]=_=>s.value=!s.value)},[f("i",{class:p(["icon-24px text-primary",s.value?"mi-pass-show":"mi-pass-hide"])},null,2)])):d("",!0)],2))}};typeof y=="function"&&y(B);export{B as _};