"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));

var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));

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

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

var _BarneyBox = _interopRequireDefault(require("@instructure/quiz-common/lib/components/BarneyBox"));

var _Heading = _interopRequireDefault(require("@instructure/ui-elements/lib/components/Heading"));

var _uiIcons = require("@instructure/ui-icons");

var _CloseButton = _interopRequireDefault(require("@instructure/ui-buttons/lib/components/CloseButton"));

var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/lib/format-message"));

var PreviewFrame =
/*#__PURE__*/
function (_Component) {
  (0, _inherits2.default)(PreviewFrame, _Component);

  function PreviewFrame() {
    (0, _classCallCheck2.default)(this, PreviewFrame);
    return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(PreviewFrame).apply(this, arguments));
  }

  (0, _createClass2.default)(PreviewFrame, [{
    key: "render",
    value: function render() {
      return _react.default.createElement(_BarneyBox.default, {
        screenReaderText: "You are in preview mode."
      }, _react.default.createElement(_BarneyBox.default.Body, null, this.props.children), _react.default.createElement(_BarneyBox.default.Footer, null, _react.default.createElement(_Heading.default, {
        level: "h4",
        color: "primary-inverse"
      }, _react.default.createElement(_uiIcons.IconEyeSolid, {
        variant: "icon-inverse"
      }), " \xA0", "Preview"), _react.default.createElement(_CloseButton.default, {
        onClick: this.props.onPreviewClose,
        variant: "icon-inverse"
      }, "Sluiten")));
    }
  }]);
  PreviewFrame.displayName = "PreviewFrame";
  return PreviewFrame;
}(_react.Component);

exports.default = PreviewFrame;
PreviewFrame.propTypes = {
  children: _propTypes.default.element.isRequired,
  onPreviewClose: _propTypes.default.func.isRequired
};