import 'core-js/modules/es.object.assign.js';
import { __rest } from '../../../_virtual/_tslib.js';
import { jsx } from 'react/jsx-runtime';
import { IconButton } from '../../atom/Button/IconButton.js';
import { IconFont } from '../../atom/IconFont/IconFont.js';

const SwitchIconButton = _a => {
  var {
      selected = false,
      onSwitch
    } = _a,
    props = __rest(_a, ["selected", "onSwitch"]);
  return jsx(IconButton, Object.assign({
    style: {
      minWidth: 24,
      height: 24
    },
    onClick: e => {
      e.stopPropagation();
      onSwitch(!selected);
    }
  }, props, {
    children: jsx(IconFont, {
      name: selected ? 'remove' : 'add',
      fontSize: 20
    })
  }));
};

export { SwitchIconButton, SwitchIconButton as default };
