import{a as x,k as F,C as R,b as g,o as V,m as o,g as t,p as r,f as B,q as l,u as a,L as C,D as _,I as m,F as T,H as O,M as w,ac as D}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import{w as L,x as M,t as N}from"./widget-BUAABBRb.js";import{u as S}from"./translationsStore-DBJu9sBR.js";import{_ as A}from"./RequiredHint.vue_vue_type_style_index_0_lang-R4Bqx90z.js";import{_ as I}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";const U={class:"ccb-order-field__wrapper"},$={class:"ccb-order-field__title"},z={class:"ccb-order-field__label"},E={key:0,class:"ccb-order-required-mark"},H=["name","value"],W={class:"ccb-radio-label"},j=x({__name:"OrderRadio",props:{field:{}},setup(v){const s=F(""),f=v,{field:e}=R(f),{checkFieldRequired:b}=L(),h=S(),i=g(()=>e.value.required?b(e.value):!1),k=()=>{e.value.value=s.value;const{updateValue:d}=N();d(e.value.id,e.value.value)};return V(()=>{Array.isArray(e.value.value)&&(e.value.value=M(e.value.value[0]||""),s.value=e.value.value)}),(d,c)=>{var u,n;return t(),o("div",{class:m(["ccb-order-field ccb-order-radio",{[`ccb-col-${a(e).fieldWidth}`]:!0,"ccb-order-field--required":i.value}])},[r("div",U,[r("div",$,[i.value?(t(),B(A,{key:0,text:a(h).getTranslations.requiredField},null,8,["text"])):l("",!0),r("label",z,[C(_(a(e).label)+" ",1),a(e).required?(t(),o("span",E,"*")):l("",!0)])]),r("div",{class:m(["ccb-default-radio",{[((u=a(e).attributes)==null?void 0:u.display)||""]:!0}])},[(n=a(e).attributes)!=null&&n.options?(t(!0),o(T,{key:0},O(a(e).attributes.options,(p,y)=>(t(),o("label",{key:y},[w(r("input",{type:"radio",name:"form_radio_"+a(e).id,value:p.optionText,onChange:k,"onUpdate:modelValue":c[0]||(c[0]=q=>s.value=q)},null,40,H),[[D,s.value]]),r("span",W,_(p.optionText),1)]))),128)):l("",!0)],2)])],2)}}}),Z=I(j,[["__scopeId","data-v-5022895c"]]);export{Z as default};
//# sourceMappingURL=OrderRadio-BAazbAoN.js.map
