"use strict";

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

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

var _grip = _interopRequireDefault(require("../multi-column/grip"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * <HeaderBar />
 */
const SHOW_CLONE = ["ThreeColumnRow", "TwoColumnRow", "FourColumnRow"];

class HeaderBar extends _react.default.Component {
  render() {
    return /*#__PURE__*/_react.default.createElement("div", {
      className: "toolbar-header"
    }, /*#__PURE__*/_react.default.createElement("span", {
      className: "badge badge-secondary"
    }, this.props.data.text), this.props.hasClicked && /*#__PURE__*/_react.default.createElement("div", {
      className: "toolbar-header-buttons"
    }, this.props.data.element !== "LineBreak" && /*#__PURE__*/_react.default.createElement("div", {
      className: "btn is-isolated",
      onClick: this.props.editModeOn.bind(this.props.parent, this.props.data)
    }, /*#__PURE__*/_react.default.createElement("i", {
      className: "is-isolated fas fa-edit"
    })), /*#__PURE__*/_react.default.createElement("div", {
      className: "btn is-isolated",
      onClick: this.props.onDestroy.bind(this, this.props.data)
    }, /*#__PURE__*/_react.default.createElement("i", {
      className: "is-isolated fas fa-trash"
    })), SHOW_CLONE.includes(this.props.data.element) && /*#__PURE__*/_react.default.createElement("div", {
      className: "btn is-isolated",
      onClick: this.props.onDuplicateClick.bind(this, this.props.data)
    }, /*#__PURE__*/_react.default.createElement("i", {
      className: "is-isolated fas fa-clone"
    }))));
  }

}

exports.default = HeaderBar;