import React from 'react';
import PropTypes from 'prop-types';
import { SoftCheckbox } from './SoftCheckbox';
export const SoftCheckboxGroup = ({ options, idToSelectedMap, onChange, className, disabled, compressed, ...rest }) => (React.createElement("div", Object.assign({ className: className }, rest), options.map((option, index) => {
    return (React.createElement(SoftCheckbox, { className: "softCheckboxGroup__item", key: index, id: option.id, checked: idToSelectedMap[option.id], label: option.label, disabled: disabled, onChange: onChange.bind(null, option.id), compressed: compressed }));
})));
// @ts-ignore
SoftCheckboxGroup.propTypes = {
    options: PropTypes.arrayOf(PropTypes.shape({
        id: PropTypes.string.isRequired,
        label: PropTypes.node,
    })).isRequired,
    idToSelectedMap: PropTypes.objectOf(PropTypes.bool).isRequired,
    onChange: PropTypes.func.isRequired,
    /**
     * Tightens up the spacing between checkbox rows and sends down the
     * compressed prop to the checkbox itself
     */
    compressed: PropTypes.bool,
};
// @ts-ignore
SoftCheckboxGroup.defaultProps = {
    options: [],
    idToSelectedMap: {}
};
//# sourceMappingURL=SoftCheckboxGroup.js.map