import{j as l}from"./vendor-react-wBh_31cN.js";import{d as c}from"./index-dNe6i2rS.js";import{C as t}from"./checkbox-BlA4MwH9.js";import{L as h}from"./label-gPWmc6ow.js";function g({options:d,value:s,onChange:r,className:m}){const x=(e,a)=>{r(a?[...s,e]:s.filter(o=>o!==e))};return l.jsx("div",{"data-slot":"checkbox-group",className:c("flex flex-col gap-2",m),children:d.map(e=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(t,{id:`checkbox-group-${e.value}`,checked:s.includes(e.value),disabled:e.disabled,onCheckedChange:a=>x(e.value,a===!0)}),l.jsx(h,{htmlFor:`checkbox-group-${e.value}`,className:c("text-sm font-normal",e.disabled&&"opacity-50 cursor-not-allowed"),children:e.label})]},e.value))})}export{g as C};
