import{a as q,C as h,b as V,m as i,g as o,p as a,f as x,q as u,u as t,L as N,D as g,M as C,U as F,I as w}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import{w as y,t as l}from"./widget-BUAABBRb.js";import{u as B}from"./translationsStore-DBJu9sBR.js";import{_ as O}from"./RequiredHint.vue_vue_type_style_index_0_lang-R4Bqx90z.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";const T={class:"ccb-order-field__title"},D=["for"],I={key:0,class:"ccb-order-required-mark"},S={class:"ccb-order-field__wrapper"},M=["id","placeholder"],P=q({__name:"OrderNumber",props:{field:{}},setup(n){const p=n,{field:e}=h(p),{checkFieldRequired:m}=y(),f=B(),c=V(()=>e.value.required?m(e.value):!1),_=s=>{const{updateValue:r}=l(),k=s.target.value;r(e.value.id,k)},v=()=>{const{updateValue:s}=l();let r=Number(e.value.value||0);s(e.value.id,r+1)},b=()=>{const{updateValue:s}=l();let r=Number(e.value.value||0);s(e.value.id,r-1||0)};return(s,r)=>(o(),i("div",{class:w(["ccb-order-field ccb-order-number",{[`ccb-col-${t(e).fieldWidth}`]:!0,"ccb-order-field--required":c.value}])},[a("div",T,[c.value?(o(),x(O,{key:0,text:t(f).getTranslations.requiredField},null,8,["text"])):u("",!0),a("label",{for:"number_"+t(e).id,class:"ccb-order-field__label"},[N(g(t(e).label)+" ",1),t(e).required?(o(),i("span",I,"*")):u("",!0)],8,D)]),a("div",S,[C(a("input",{type:"number",id:"number_"+t(e).id,placeholder:t(e).placeholder,onInput:_,"onUpdate:modelValue":r[0]||(r[0]=d=>t(e).value=d)},null,40,M),[[F,t(e).value]]),a("div",{class:"ccb-input-counter up",onClick:v},r[1]||(r[1]=[a("i",{class:"ccb-icon-Path-3486"},null,-1)])),a("div",{class:"ccb-input-counter down",onClick:b},r[2]||(r[2]=[a("i",{class:"ccb-icon-Path-3485"},null,-1)]))])],2))}}),j=R(P,[["__scopeId","data-v-764aaf63"]]);export{j as default};
//# sourceMappingURL=OrderNumber-BMI1Lc6b.js.map
