import{a as k,C,b as V,m as l,g as a,F as x,H as M,K as B,I as D,u as e,p as n,M as O,$ as T,Z as w,D as y}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import{u as H}from"./useMultiOptionChildShared-DVKrDZdt.js";import{_ as I}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./color-filter.utils-DukMf1cu.js";import"./widget-BUAABBRb.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./translationsStore-DBJu9sBR.js";const L={class:"ccb-box-toggle ccb-toggle-grid"},S=["onClick"],$={class:"ccb-toggle-wrapper"},F=["id","name","value","onClick"],N=["for"],R={class:"ccb-toggle-item__label-wrap"},W={class:"ccb-toggle-item__label"},z=["innerHTML"],E=k({__name:"BoxToggleWithDescription",props:{field:{},values:{}},emits:["update"],setup(g,{emit:b}){const h=b,u=g,{field:d}=C(u),_=V(()=>Math.random().toString(36).substring(2,15)),{optionValues:t,changeValue:v,getName:c,selectedOptions:f}=H(u,h),m=r=>{const s=t.value.indexOf(r);s===-1?t.value.push(r):t.value.splice(s,1),v()};return(r,s)=>(a(),l("div",L,[(a(!0),l(x,null,M(e(d).options,(o,i)=>(a(),l("label",{class:D(["ccb-toggle-item",{active:e(f).includes(o.optionValue),"ccb-option-disabled":e(d).disableOptions.includes(i)}]),key:i,onClick:B(p=>m(o.optionValue),["prevent"])},[n("div",$,[O((a(),l("input",{id:e(c)+"_"+i+"_"+_.value,type:"checkbox",name:e(c),"onUpdate:modelValue":s[0]||(s[0]=p=>w(t)?t.value=p:null),value:o.optionValue,onClick:p=>m(o.optionValue),key:i},null,8,F)),[[T,e(t)]]),n("label",{for:e(c)+"_"+i+"_"+_.value},null,8,N)]),n("div",R,[n("span",W,y(o.optionText),1),n("span",{class:"ccb-toggle-item__description",innerHTML:o.optionHint},null,8,z)])],10,S))),128))]))}}),P=I(E,[["__scopeId","data-v-1360d0ee"]]);export{P as default};
//# sourceMappingURL=BoxToggleWithDescription-nPbUEoji.js.map
