'use strict';

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

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _class, _temp;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _Button = require('@instructure/ui-buttons/lib/components/Button');

var _Button2 = _interopRequireDefault(_Button);

var _IconEdit = require('@instructure/ui-icons/lib/Line/IconEdit');

var _IconEdit2 = _interopRequireDefault(_IconEdit);

var _ScreenReaderContent = require('@instructure/ui-a11y/lib/components/ScreenReaderContent');

var _ScreenReaderContent2 = _interopRequireDefault(_ScreenReaderContent);

var _makeScrollable = require('../../../../../common/components/shared/functionality/makeScrollable');

var _makeScrollable2 = _interopRequireDefault(_makeScrollable);

var _formatMessage = require('@instructure/quiz-common/lib/format-message');

var _formatMessage2 = _interopRequireDefault(_formatMessage);

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

var EditButton = (_temp = _class = function (_Component) {
  (0, _inherits3.default)(EditButton, _Component);

  function EditButton() {
    (0, _classCallCheck3.default)(this, EditButton);
    return (0, _possibleConstructorReturn3.default)(this, (EditButton.__proto__ || Object.getPrototypeOf(EditButton)).apply(this, arguments));
  }

  (0, _createClass3.default)(EditButton, [{
    key: 'render',
    value: function render() {
      return _react2.default.createElement(
        _Button2.default,
        {
          variant: 'icon',
          size: 'small',
          icon: _IconEdit2.default,
          onClick: this.props.onClick
        },
        _react2.default.createElement(
          _ScreenReaderContent2.default,
          null,
          this.props.screenreaderText
        )
      );
    }
  }]);
  EditButton.displayName = 'EditButton'
  ;
  return EditButton;
}(_react.Component), _class.propTypes = {
  onClick: _propTypes2.default.func.isRequired,
  screenreaderText: _propTypes2.default.string
}, _class.defaultProps = {
  screenreaderText: 'Rediger'
}, _temp);
exports.default = (0, _makeScrollable2.default)(EditButton);