import{h as q}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{r as F,s as R,l as B}from"./fieldsStore-CQRN0FvQ.js";import{u as V}from"./translationsStore-D6vLzgNA.js";import{_ as g}from"./RequiredHint.vue_vue_type_style_index_0_lang-DGTCbwUk.js";import{d as T,e as C,a as O,f as s,i as a,x as t,k as N,t as i,z as S,F as w,r as z,B as A}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{r as D,t as L,u as r}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as p,a as _}from"./vendor-vue-shared-DrzsEcag.js";import{_ as M}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 U={class:"ccb-order-field__wrapper"},$={class:"ccb-order-field__title"},E={class:"ccb-order-field__label"},I={key:0,class:"ccb-order-required-mark"},W=["name","value"],j={class:"ccb-radio-label"},G=T({__name:"OrderRadio",props:{field:{}},setup(f){const o=D(""),v=f,{field:e}=L(v),{checkFieldRequired:b}=F(),h=V(),l=C(()=>e.value.required?b(e.value):!1),k=()=>{e.value.value=o.value;const{updateValue:d}=B();d(e.value.id,e.value.value)};return O(()=>{Array.isArray(e.value.value)&&(e.value.value=R(e.value.value[0]||""),o.value=e.value.value)}),(d,c)=>{var u,n;return a(),s("div",{class:_(["ccb-order-field ccb-order-radio",{[`ccb-col-${r(e).fieldWidth}`]:!0,"ccb-order-field--required":l.value}])},[t("div",U,[t("div",$,[l.value?(a(),N(g,{key:0,text:r(h).getTranslations.requiredField},null,8,["text"])):i("",!0),t("label",E,[S(p(r(e).label)+" ",1),r(e).required?(a(),s("span",I,"*")):i("",!0)])]),t("div",{class:_(["ccb-default-radio",{[((u=r(e).attributes)==null?void 0:u.display)||""]:!0}])},[(n=r(e).attributes)!=null&&n.options?(a(!0),s(w,{key:0},z(r(e).attributes.options,(m,y)=>(a(),s("label",{key:y},[A(t("input",{type:"radio",name:"form_radio_"+r(e).id,value:m.optionText,onChange:k,"onUpdate:modelValue":c[0]||(c[0]=x=>o.value=x)},null,40,W),[[q,o.value]]),t("span",j,p(m.optionText),1)]))),128)):i("",!0)],2)])],2)}}}),ne=M(G,[["__scopeId","data-v-5022895c"]]);export{ne as default};
//# sourceMappingURL=OrderRadio-DXJatAKx.js.map
