import{b as k}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{r as L,l as T}from"./fieldsStore-CNpVuoPu.js";import{u as V}from"./translationsStore-D6vLzgNA.js";import{_ as p}from"./RequiredHint.vue_vue_type_style_index_0_lang-DGTCbwUk.js";import{d as y,e as _,f as l,i as a,x as o,t as f,B,k as v,z as F}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as O,r as R,u as t}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as c,a as w}from"./vendor-vue-shared-DrzsEcag.js";import{_ as C}from"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-pinia-BSPefQhS.js";import"./settingsStore-8bwiLMEn.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./appStore-CFAkQG2b.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"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-html2canvas-BfYXEYrK.js";const N={class:"ccb-order-field__wrapper"},S={key:0,class:"ccb-required-tooltip"},z={class:"ccb-order-field__label"},D={key:0,class:"ccb-order-required-mark"},I=["placeholder","maxlength"],M={class:"ccb-order-field__counter"},$=y({__name:"OrderTextarea",props:{field:{}},setup(h){const b=h,{field:e}=O(b),s=R("required"),{checkFieldRequired:x}=L(),u=V(),q=r=>{s.value="required";const{updateValue:i}=T(),m=r.target.value;m.length>(e.value.attributes.characterLimit||0)&&(s.value="characterLimit"),i(e.value.id,m)},d=_(()=>s.value==="characterLimit"?!0:e.value.required?x(e.value):!1),g=_(()=>{var r;return((r=e.value.value)==null?void 0:r.length)||0});return(r,i)=>(a(),l("div",{class:w(["ccb-order-field ccb-order-textarea",{[`ccb-col-${t(e).fieldWidth}`]:!0,"ccb-order-field--required":d.value}])},[o("div",N,[d.value?(a(),l("div",S,[s.value==="characterLimit"?(a(),v(p,{key:0,text:t(e).attributes.characterLimit+t(u).getTranslations.charactersMax},null,8,["text"])):(a(),v(p,{key:1,text:t(u).getTranslations.requiredField},null,8,["text"]))])):f("",!0),o("label",z,[F(c(t(e).label)+" ",1),t(e).required?(a(),l("span",D,"*")):f("",!0)]),B(o("textarea",{placeholder:t(e).placeholder,"onUpdate:modelValue":i[0]||(i[0]=n=>t(e).value=n),onInput:q,cols:"6",rows:"5",maxlength:t(e).attributes.characterLimit},null,40,I),[[k,t(e).value]]),o("div",M,[o("span",null,c(g.value)+" / "+c(t(e).attributes.characterLimit),1)])])],2))}}),se=C($,[["__scopeId","data-v-815283c7"]]);export{se as default};
//# sourceMappingURL=OrderTextarea-CY4FgMw2.js.map
