"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/objectWithoutProperties"),n=require("react/jsx-runtime"),o=require("react"),i=require("../RadioAndCheckboxGroup/RadioAndCheckboxGroup.js"),c=require("../Checkbox/Checkbox.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(e),p=u(r),l=u(t),s=["onChange","size","spacing","direction"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){a.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var d=function(e,r){return!(null==r||!r.includes(e))};exports.CheckboxGroup=function(e){var r=e.onChange,t=e.size,u=void 0===t?"medium":t,a=e.spacing,b=void 0===a?"normal":a,h=e.direction,O=void 0===h?"vertical":h,j=l.default(e,s),g=o.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){if(r){for(var o=n?[].concat(p.default(t),[e]):t.filter((function(r){return r!==e})),i=arguments.length,c=new Array(i>1?i-1:0),u=1;u<i;u++)c[u-1]=arguments[u];r.apply(void 0,[o].concat(c))}}}),[r]);return n.jsx(i.RadioAndCheckboxGroup,f(f({},j),{},{size:u,spacing:b,direction:O,component:c.Checkbox,getOnChangeHandler:g,getOptionChecked:d}))};
//# sourceMappingURL=CheckboxGroup.js.map
