"use strict";

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

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

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 _IconHamburger = _interopRequireDefault(require("@instructure/ui-icons/lib/Line/IconHamburger"));

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

var _lib = _interopRequireDefault(require("@instructure/ui-themeable/lib"));

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

var _theme = _interopRequireDefault(require("./theme"));

var _dec, _class, _class2, _temp;

var styles = {
  componentId: 'cUqra',
  template: function template(theme) {
    return "\n\n.cUqra_nvdO{display:none;height:inherit}\n\n@media screen and (--phoneBreakPoint){.cUqra_nvdO{align-items:center;display:flex}}\n\n.cUqra_cdzo{background:transparent;border:none;color:".concat(theme.menuButtonColor || 'inherit', ";font-size:").concat(theme.menuButtonFontSize || 'inherit', ";height:inherit}\n\n.cUqra_cdzo:hover{opacity:").concat(theme.menuButtonHoverOpacity || 'inherit', "}");
  },
  'title': 'cUqra_nvdO',
  'menuButton': 'cUqra_cdzo'
};

var _ref =
/*#__PURE__*/
_react.default.createElement(_IconHamburger.default, null);

var HeaderMenuButton = (_dec = (0, _lib.default)(_theme.default, styles), _dec(_class = (_temp = _class2 =
/*#__PURE__*/
function (_Component) {
  (0, _inherits2.default)(HeaderMenuButton, _Component);

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

  (0, _createClass2.default)(HeaderMenuButton, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          hidden = _this$props.hidden,
          sidebarMenuClick = _this$props.sidebarMenuClick;

      if (hidden) {
        return null;
      }

      return _react.default.createElement("div", {
        className: styles.title
      }, _react.default.createElement("button", {
        className: styles.menuButton,
        onClick: sidebarMenuClick,
        tabIndex: "0",
        "data-automation": "sdk-hamburger-button"
      }, _ref, _react.default.createElement(_ScreenReaderContent.default, null, "Apri menu")));
    }
  }]);
  HeaderMenuButton.displayName = "HeaderMenuButton";
  return HeaderMenuButton;
}(_react.Component), _class2.propTypes = {
  sidebarMenuClick: _propTypes.default.func.isRequired,
  hidden: _propTypes.default.bool.isRequired
}, _temp)) || _class);
exports.default = HeaderMenuButton;