import{u as g}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{u as x}from"./fieldsStore-CNpVuoPu.js";import{u as V}from"./appearanceStore-Cp-euDX2.js";import{u as q}from"./useAppearanceTypography-BBl5RU11.js";import{d as S,e as A,f as r,i,x as a,t as o}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as t,t as F,r as O}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as d,a as B}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./settingsStore-8bwiLMEn.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.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";import"./useAppearanceStore-IzenP-G4.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";const D={class:"ccb-field__label"},N={class:"ccb-field__title"},P={key:0,class:"ccb-field-required-mark"},T={key:0,class:"ccb-field__hidden"},w={key:0,class:"ccb-field__descriptions ccb-before"},z={key:0,class:"ccb-field__description"},E={class:"ccb-field__input-wrapper"},I=["value","placeholder"],R={key:1,class:"ccb-field__descriptions ccb-after"},j={key:0,class:"ccb-field__description"},le=S({__name:"Text",props:{field:{}},setup(f){g(s=>({"6f41b0e8":t(y),"51c0826d":t(C),f67034c8:t(k)}));const m=f,{field:e}=F(m),n=x(),p=V(),u=O("required"),v=s=>{var _;u.value="required";let l=s;e.value.value=0,e.value.displayValue=l;const c=(_=e.value.displayValue)==null?void 0:_.length;if(e.value.numberOfCharacters===0&&(e.value.numberOfCharacters=150),!e.value.numberOfCharacters){n.updateField(e.value.alias,e.value);return}u.value=c>e.value.numberOfCharacters?"limit":"required",n.updateField(e.value.alias,e.value)},b=s=>{let c=s.target.value;v(c)},h=A(()=>{var s;return((s=e.value)==null?void 0:s.additionalStyles)||""}),{textColor:y,borderColor:C,formFieldsColor:k}=q();return(s,l)=>(i(),r("div",{class:B(["ccb-field ccb-text-field",{"ccb-field-disabled":t(e).disabled,[h.value]:!0}])},[a("div",D,[a("div",N,[a("span",null,d(t(e).label),1),t(e).required?(i(),r("span",P,"*")):o("",!0)]),t(e).hidden?(i(),r("div",T,l[0]||(l[0]=[a("i",{class:"ccb-icon-ic_eye_crossed"},null,-1)]))):o("",!0)]),t(p).getAppearanceDescriptionPosition==="before"?(i(),r("div",w,[t(e).description?(i(),r("div",z,d(t(e).description),1)):o("",!0)])):o("",!0),a("div",E,[a("textarea",{value:t(e).displayValue,placeholder:t(e).placeholder,onInput:b},null,40,I)]),t(p).getAppearanceDescriptionPosition==="after"?(i(),r("div",R,[t(e).description?(i(),r("div",j,d(t(e).description),1)):o("",!0)])):o("",!0)],2))}});export{le as default};
//# sourceMappingURL=Text-BQJNMQ5U.js.map
