1import{_ as m}from"./BRct_4MJ.js";import{d as V,M as f,c as k,N as B,r as C,w,a as n,o as u,n as r,e as i,x as D,h as c,t as b,b as M,z as A,F as N,A as z,v as F}from"./D9I6SPE_.js";const K={key:0,class:"ml-[2rem] bg-gray-50 rounded-[8px] px-[1rem] py-[0.5rem] mb-[1.5rem]"},S={class:"sc-cn_B3-400"},q=V({__name:"UiCheckboxGroup",props:f({showAll:{type:Boolean,default:!1},options:{default:()=>[]},disabled:{type:Boolean,default:!1},outSideClass:{default:""},title:{default:""},direction:{default:"vertical"},itemsCenter:{type:Boolean,default:!0},textClass:{},haveDisabledByFirstIsNo:{type:Boolean,default:!1},disabledKey:{default:""},allOptionDisabled:{}},{modelValue:{required:!0,default:()=>[]},modelModifiers:{}}),emits:f(["update:modelValue","change"],["update:modelValue"]),setup(d){const l=d,p=k(()=>{var e;return((e=l==null?void 0:l.allOptionDisabled)==null?void 0:e.value)??!1}),t=B(d,"modelValue"),o=C(!1);function v(e){return e.value!==l.disabledKey&&t.value.includes(l.disabledKey)||p.value}function g(e){e.length<l.options.length&&(o.value=!1),e.length===l.options.length&&(o.value=!0)}function h(e){e?t.value=l.options.filter(s=>s.value).map(s=>s.value):t.value=[]}return w(()=>t.value,e=>{l.options.length===e.length&&(o.value=!0)},{immediate:!0}),(e,s)=>(u(),n("div",{class:r(["",e.outSideClass])},[i("p",{class:r(["font-bold",{"mb-[1rem]":e.title}])},b(e.title),3),e.showAll?(u(),D(m,{key:0,modelValue:M(o),"onUpdate:modelValue":s[0]||(s[0]=a=>A(o)?o.value=a:null),label:"å
¨é¨",class:"mb-[1rem]",onChange:h},null,8,["modelValue"])):c("",!0),i("div",{class:r({"tablet:flex tablet:flex-wrap tablet:items-center ":e.direction==="horizontal"})},[(u(!0),n(N,null,z(e.options,a=>(u(),n("div",{key:a.label,class:r(["last:mb-0",{"tablet:w-[49%]":e.direction==="horizontal"}])},[F(m,{"group-model-value":t.value,"onUpdate:groupModelValue":[s[1]||(s[1]=y=>t.value=y),g],value:a.value,label:a.label,disabled:v(a),"items-center":e.itemsCenter,"is-group":"",class:r(a.remark?"mb-[0.5rem]":"mb-[1rem]")},null,8,["group-model-value","value","label","disabled","items-center","class"]),a.remark?(u(),n("div",K,[i("p",S,b(a.remark),1)])):c("",!0)],2))),128))],2)],2))}});export{q as _};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.