"use strict";

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

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

var _propTypes = _interopRequireDefault(require("prop-types"));

var _CreateButton = _interopRequireDefault(require("../record/CreateButton"));

var _AdminTabButtonBar = _interopRequireDefault(require("../../../styles/cspace-ui/AdminTabButtonBar.css"));

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

const propTypes = {
  isCreatable: _propTypes.default.bool,
  onCreateButtonClick: _propTypes.default.func
};

function AdminTabButtonBar(props) {
  const {
    isCreatable,
    onCreateButtonClick
  } = props;

  if (!isCreatable) {
    return null;
  }

  return /*#__PURE__*/_react.default.createElement("div", {
    className: _AdminTabButtonBar.default.common
  }, /*#__PURE__*/_react.default.createElement(_CreateButton.default, {
    onClick: onCreateButtonClick
  }));
}

AdminTabButtonBar.propTypes = propTypes;