'use strict';

require('core-js/modules/es.regexp.exec.js');
require('core-js/modules/es.string.replace.js');
var React = require('react');
var Button = require('../../Button/Button.js');
var Settings = require('../../../constants/Settings.js');
var iconsReact = require('@carbon/icons-react');

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

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

var iotPrefix = Settings.settings.iotPrefix;

/* this component is only used internally where props are defined and set. */
/* eslint-disable react/prop-types */
var BulkActionHeader = function BulkActionHeader(_ref) {
  var className = _ref.className,
    i18n = _ref.i18n,
    editModeSelectedIds = _ref.editModeSelectedIds,
    cancelMoveClicked = _ref.cancelMoveClicked,
    setShowModal = _ref.setShowModal;
  return /*#__PURE__*/React__default.default.createElement("div", {
    className: className
  }, /*#__PURE__*/React__default.default.createElement("div", {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--title")
  }, editModeSelectedIds.length > 1 ? typeof i18n.itemsSelected === 'function' ? i18n.itemsSelected(editModeSelectedIds.length) :
  // Kept for backward compatability with existing i18n strings
  i18n.itemsSelected.replace('%d', editModeSelectedIds.length) : i18n.itemSelected), /*#__PURE__*/React__default.default.createElement("div", {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--button-container")
  }, /*#__PURE__*/React__default.default.createElement(Button, {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--button"),
    renderIcon: iconsReact.Move,
    onClick: function onClick() {
      setShowModal(true);
    }
  }, i18n.move), /*#__PURE__*/React__default.default.createElement("div", {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--divider")
  }), /*#__PURE__*/React__default.default.createElement(Button, {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--button-no-icon"),
    onClick: cancelMoveClicked
  }, i18n.cancel)));
};
/* esline-enable react/prop-types */
BulkActionHeader.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "BulkActionHeader"
};
var BulkActionHeader$1 = BulkActionHeader;

module.exports = BulkActionHeader$1;
