"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _box = _interopRequireDefault(require("../../box"));

var _BulkActions = _interopRequireDefault(require("./BulkActions"));

var _NumSelectedRows = _interopRequireDefault(require("./NumSelectedRows"));

var _theme = _interopRequireDefault(require("./theme.css"));

var _excluded = ["children", "className", "headerCellCheckboxSize", "numSelectedRows", "numSelectedRowsLabel"];

var HeaderRowOverlay = function HeaderRowOverlay(_ref) {
  var children = _ref.children,
      className = _ref.className,
      headerCellCheckboxSize = _ref.headerCellCheckboxSize,
      _ref$numSelectedRows = _ref.numSelectedRows,
      numSelectedRows = _ref$numSelectedRows === void 0 ? 0 : _ref$numSelectedRows,
      numSelectedRowsLabel = _ref.numSelectedRowsLabel,
      others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var classNames = (0, _classnames.default)(_theme.default['header-row-overlay'], _theme.default["data-grid-checkbox-size-".concat(headerCellCheckboxSize)], className);
  return /*#__PURE__*/_react.default.createElement(_box.default, (0, _extends2.default)({
    display: "flex",
    alignItems: "center",
    className: classNames,
    "data-teamleader-ui": "datagrid-header-row-overlay"
  }, others), /*#__PURE__*/_react.default.createElement(_NumSelectedRows.default, {
    numSelectedRows: numSelectedRows,
    numSelectedRowsLabel: numSelectedRowsLabel
  }), /*#__PURE__*/_react.default.createElement(_BulkActions.default, {
    bulkActions: children
  }));
};

var _default = HeaderRowOverlay;
exports.default = _default;
HeaderRowOverlay.displayName = 'DataGrid.HeaderRowOverlay';