import{__rest as o,__spreadArray as i,__assign as n}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{useCallback as e}from"react";import{RadioAndCheckboxGroup as t}from"../RadioAndCheckboxGroup/RadioAndCheckboxGroup.js";import{Checkbox as c}from"../Checkbox/Checkbox.js";var d=function(o,i){return!!(null==i?void 0:i.includes(o))},a=function(a){var m=a.onChange,u=a.size,p=void 0===u?"medium":u,s=a.spacing,f=void 0===s?"normal":s,l=a.direction,v=void 0===l?"vertical":l,g=o(a,["onChange","size","spacing","direction"]),h=e((function(o,n){return void 0===n&&(n=[]),function(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(m){var c=r?i(i([],n,!0),[o],!1):n.filter((function(i){return i!==o}));m.apply(void 0,i([c],e,!1))}}}),[m]);return r(t,n({},g,{size:p,spacing:f,direction:v,component:c,getOnChangeHandler:h,getOptionChecked:d}))};export{a as CheckboxGroup};
