'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _reactIntl = require('react-intl');

var _cspaceInput = require('cspace-input');

var _OpenButton = require('../../../styles/cspace-ui/OpenButton.css');

var _OpenButton2 = _interopRequireDefault(_OpenButton);

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

var Button = _cspaceInput.components.Button;


var messages = (0, _reactIntl.defineMessages)({
  label: {
    'id': 'openButton.label',
    'defaultMessage': 'Open'
  }
});

var propTypes = {
  onClick: _propTypes2.default.func
};

function OpenButton(props) {
  var onClick = props.onClick;


  return _react2.default.createElement(
    Button,
    {
      className: _OpenButton2.default.common,
      icon: true,
      name: 'open',
      onClick: onClick
    },
    _react2.default.createElement(_reactIntl.FormattedMessage, messages.label)
  );
}

OpenButton.propTypes = propTypes;