'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _CreateButton = require('../record/CreateButton');

var _CreateButton2 = _interopRequireDefault(_CreateButton);

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

var _AdminTabButtonBar2 = _interopRequireDefault(_AdminTabButtonBar);

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

var propTypes = {
  isCreatable: _propTypes2.default.bool,
  onCreateButtonClick: _propTypes2.default.func
};

function AdminTabButtonBar(props) {
  var isCreatable = props.isCreatable,
      onCreateButtonClick = props.onCreateButtonClick;


  if (!isCreatable) {
    return null;
  }

  return _react2.default.createElement(
    'div',
    { className: _AdminTabButtonBar2.default.common },
    _react2.default.createElement(_CreateButton2.default, { onClick: onCreateButtonClick })
  );
}

AdminTabButtonBar.propTypes = propTypes;