import React from 'react';
import classNames from 'classnames';
const typeToInputTypeMap = {
    single: 'radio',
    multi: 'checkbox',
};
export const TOGGLE_TYPES = Object.keys(typeToInputTypeMap);
export const SoftToggle = ({ id, className, checked, children, inputClassName, isDisabled, label, name, onChange, title, type, value, ...rest }) => {
    const classes = classNames('softToggle', { 'softToggle--checked': checked }, className);
    const inputClasses = classNames('softToggle__input', inputClassName);
    return (React.createElement("div", Object.assign({ className: classes }, rest),
        React.createElement("input", { id: id, className: inputClasses, "aria-label": label, checked: checked, disabled: isDisabled, name: name, onChange: onChange, title: title, type: type ? typeToInputTypeMap[type] : undefined, value: value }),
        children));
};
// @ts-ignore
SoftToggle.defaultProps = {
    type: 'multi',
};
//# sourceMappingURL=SoftToggle.js.map