import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../../box';
import { TextBody, Monospaced } from '../../typography';

var NumSelectedRows = /*#__PURE__*/function (_PureComponent) {
  _inherits(NumSelectedRows, _PureComponent);

  var _super = _createSuper(NumSelectedRows);

  function NumSelectedRows() {
    _classCallCheck(this, NumSelectedRows);

    return _super.apply(this, arguments);
  }

  _createClass(NumSelectedRows, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          numSelectedRows = _this$props.numSelectedRows,
          numSelectedRowsLabel = _this$props.numSelectedRowsLabel;
      return /*#__PURE__*/React.createElement(Box, {
        marginRight: 3,
        "data-teamleader-ui": "datagrid-num-selected-rows"
      }, /*#__PURE__*/React.createElement(TextBody, {
        element: "span",
        marginRight: 1
      }, /*#__PURE__*/React.createElement(Monospaced, null, /*#__PURE__*/React.createElement("strong", null, numSelectedRows))), /*#__PURE__*/React.createElement(TextBody, {
        color: "neutral",
        element: "span"
      }, numSelectedRowsLabel(numSelectedRows)));
    }
  }]);

  return NumSelectedRows;
}(PureComponent);

NumSelectedRows.defaultProps = {
  numSelectedRows: 0,
  numSelectedRowsLabel: function numSelectedRowsLabel() {
    return 'selected';
  }
};
export default NumSelectedRows;