import React, { Fragment } from 'react';
import { Box, Divider } from '@chakra-ui/react';
import Stack from '../stack/index.js';
import Checkbox from '../checkbox/index.js';

var CheckboxGroup = function (_a) {
    var name = _a.name, label = _a.label, value = _a.value, onChange = _a.onChange, isChecked = _a.isChecked, isDisabled = _a.isDisabled, isInvalid = _a.isInvalid, isIndeterminate = _a.isIndeterminate, addDividerAfterIndex = _a.addDividerAfterIndex, _b = _a.variant, variant = _b === void 0 ? 'alignCenter' : _b, checkboxes = _a.checkboxes;
    return (React.createElement(Stack, { spacing: "md" },
        React.createElement(Checkbox, { name: name, label: label, value: value, onChange: onChange, isChecked: isChecked, isDisabled: isDisabled, isInvalid: isInvalid, isIndeterminate: isIndeterminate, variant: variant, fontWeight: "bold" }), checkboxes === null || checkboxes === void 0 ? void 0 :
        checkboxes.map(function (item, index) { return (React.createElement(Fragment, { key: item.name },
            React.createElement(Box, { as: Checkbox, name: item.name, label: item.label, value: item.value, onChange: item.onChange, isChecked: item.isChecked, pl: "md", variant: variant, isDisabled: isDisabled }),
            (addDividerAfterIndex === null || addDividerAfterIndex === void 0 ? void 0 : addDividerAfterIndex.includes(index)) ? React.createElement(Divider, null) : null)); })));
};
CheckboxGroup.displayName = 'CheckboxGroup';

export { CheckboxGroup as default };
//# sourceMappingURL=index.js.map
