import 'core-js/modules/es.regexp.exec.js';
import 'core-js/modules/es.string.replace.js';
import React__default from 'react';
import Button from '../../Button/Button.js';
import { settings } from '../../../constants/Settings.js';
import { Move } from '@carbon/icons-react';

var iotPrefix = 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.createElement("div", {
    className: className
  }, /*#__PURE__*/React__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.createElement("div", {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--button-container")
  }, /*#__PURE__*/React__default.createElement(Button, {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--button"),
    renderIcon: Move,
    onClick: function onClick() {
      setShowModal(true);
    }
  }, i18n.move), /*#__PURE__*/React__default.createElement("div", {
    className: "".concat(iotPrefix, "--hierarchy-list-bulk-header--divider")
  }), /*#__PURE__*/React__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;

export { BulkActionHeader$1 as default };
