1import{b as f,r as k,p as y,q as c,u as r,ac as s}from"./runtime-dom.esm-bundler--y7KDzh4.js";const V=["checked"],v=["value","checked"],b={__name:"AppCheckbox",props:{modelValue:{type:[Boolean,Array],default:()=>[]},value:{type:[String,Number,Boolean,Object],required:!1,default:""}},emits:["update:modelValue"],setup(o,{emit:d}){const e=o,t=d,n=f(()=>typeof e.modelValue=="boolean");function i(a){t("update:modelValue",a.target.checked)}const u=k(!1);y(()=>{Array.isArray(e.modelValue)&&e.modelValue.forEach(a=>{a.id===e.value.id&&(u.value=!0)})});const p=a=>{if(Array.isArray(e.modelValue)){const l=[...e.modelValue];a.target.checked?l.push(e.value):e.modelValue.forEach((m,h)=>{m.id===e.value.id&&l.splice(h,1)}),t("update:modelValue",l)}};return(a,l)=>n.value?(c(),r("input",s({key:0,type:"checkbox",class:"text-skin-primary h-4 w-4 rounded focus:ring-2"},a.$attrs,{checked:o.modelValue,onChange:i}),null,16,V)):(c(),r("input",s({key:1,type:"checkbox",class:"text-skin-primary h-4 w-4 rounded focus:ring-2"},a.$attrs,{value:o.value,checked:u.value,onChange:p}),null,16,v))}};export{b 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.