import React__default from 'react';
import { Wrapper as Wrapper$1 } from '../Inner/ui/Item/Item.styles.js';
import { IconWrapper, StyledCheckboxWrapper, StyledCheckbox, StyledCell } from '../ItemView/ItemView.styles.js';
import { Wrapper, DividerWrapper, Divider } from './SelectAll.styles.js';

var SelectAll = function SelectAll(_ref) {
  var variant = _ref.variant,
    selectAllOptions = _ref.selectAllOptions;
  return /*#__PURE__*/React__default.createElement(Wrapper, {
    variant: variant,
    onClick: selectAllOptions === null || selectAllOptions === void 0 ? void 0 : selectAllOptions.onClick,
    sticky: selectAllOptions === null || selectAllOptions === void 0 ? void 0 : selectAllOptions.sticky
  }, /*#__PURE__*/React__default.createElement(Wrapper$1, {
    variant: variant
  }, /*#__PURE__*/React__default.createElement(IconWrapper, {
    variant: variant,
    withMargin: true
  }, /*#__PURE__*/React__default.createElement(StyledCheckboxWrapper, {
    onClick: function onClick(e) {
      return e.preventDefault();
    }
  }, /*#__PURE__*/React__default.createElement(StyledCheckbox, {
    checked: selectAllOptions === null || selectAllOptions === void 0 ? void 0 : selectAllOptions.checked,
    indeterminate: selectAllOptions === null || selectAllOptions === void 0 ? void 0 : selectAllOptions.indeterminate,
    appearance: "default"
  }))), /*#__PURE__*/React__default.createElement(StyledCell, {
    title: (selectAllOptions === null || selectAllOptions === void 0 ? void 0 : selectAllOptions.label) || 'Выбрать всё'
  })), /*#__PURE__*/React__default.createElement(DividerWrapper, null, /*#__PURE__*/React__default.createElement(Divider, {
    variant: variant
  })));
};

export { SelectAll };
