import React from 'react';
import ToggleSwitchCore from './ToggleSwitchCore';
import { ToggleOff, ToggleOn, ToggleOffSmall, ToggleOnSmall, } from '@wix/wix-ui-icons-common/system';
import { TextColor } from '@wix/wix-ui-icons-common';
import { generateDataAttr } from '../utils/generateDataAttr';
import { SIZES } from './ToggleSwitch.constants';
import { st, classes } from './ToggleSwitch.st.css.js';
const checkedIconMap = {
    [SIZES.small]: undefined,
    [SIZES.medium]: React.createElement(ToggleOnSmall, null),
    [SIZES.large]: React.createElement(ToggleOn, null),
};
const uncheckedIconMap = {
    [SIZES.small]: undefined,
    [SIZES.medium]: React.createElement(ToggleOffSmall, null),
    [SIZES.large]: React.createElement(ToggleOff, null),
};
/** toggle switch */
class ToggleSwitch extends React.PureComponent {
    render() {
        const { size, skin, styles: stylesProp, // Should not allow inline styles (applied in core component)
        dataHook, className, ...rest } = this.props;
        return (React.createElement(ToggleSwitchCore, { className: st(classes.root, { skin, size }, className), ...generateDataAttr(this.props, ['skin', 'size']), "data-hook": dataHook, checkedIcon: checkedIconMap[size], uncheckedIcon: uncheckedIconMap[size], ...rest }));
    }
}
ToggleSwitch.displayName = 'ToggleSwitch';
ToggleSwitch.defaultProps = {
    skin: 'standard',
    size: 'large',
};
export default ToggleSwitch;
//# sourceMappingURL=ToggleSwitch.js.map