'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var Item_styles = require('../Inner/ui/Item/Item.styles.js');
var ItemView_styles = require('../ItemView/ItemView.styles.js');
var SelectAll_styles = require('./SelectAll.styles.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

var SelectAll = function SelectAll(_ref) {
  var variant = _ref.variant,
    selectAllOptions = _ref.selectAllOptions;
  return /*#__PURE__*/React__default.default.createElement(SelectAll_styles.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.default.createElement(Item_styles.Wrapper, {
    variant: variant
  }, /*#__PURE__*/React__default.default.createElement(ItemView_styles.IconWrapper, {
    variant: variant,
    withMargin: true
  }, /*#__PURE__*/React__default.default.createElement(ItemView_styles.StyledCheckboxWrapper, {
    onClick: function onClick(e) {
      return e.preventDefault();
    }
  }, /*#__PURE__*/React__default.default.createElement(ItemView_styles.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.default.createElement(ItemView_styles.StyledCell, {
    title: (selectAllOptions === null || selectAllOptions === void 0 ? void 0 : selectAllOptions.label) || 'Выбрать всё'
  })), /*#__PURE__*/React__default.default.createElement(SelectAll_styles.DividerWrapper, null, /*#__PURE__*/React__default.default.createElement(SelectAll_styles.Divider, {
    variant: variant
  })));
};

exports.SelectAll = SelectAll;
