"use strict";

exports.__esModule = true;
exports.default = void 0;

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

var _styles = require("@material-ui/core/styles");

var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));

var _DropDownMenu = _interopRequireDefault(require("../DropDownMenu"));

var _Icon = _interopRequireDefault(require("../../DataDisplay/Icon"));

var _DropDownMenuProps = _interopRequireDefault(require("../DropDownMenuProps"));

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

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var useStyles = (0, _styles.makeStyles)(function (theme) {
  return {
    root: {
      border: 0,
      marginLeft: "auto",
      font: "icon",
      padding: theme.spacing(0.5, 1)
    }
  };
});

var ActionMenu = function ActionMenu(_ref) {
  var payload = _ref.payload,
      menuItems = _ref.menuItems,
      children = _ref.children,
      disabled = _ref.disabled,
      autoFocus = _ref.autoFocus;
  var classes = useStyles();
  var dropDownMenuProps = new _DropDownMenuProps.default();
  if (disabled !== undefined) dropDownMenuProps.set(_DropDownMenuProps.default.propNames.disabled, disabled);
  if (autoFocus !== undefined) dropDownMenuProps.set(_DropDownMenuProps.default.propNames.autoFocus, autoFocus);
  return /*#__PURE__*/_react.default.createElement(_DropDownMenu.default, {
    children: children,
    payload: payload,
    menuItems: menuItems,
    dropDownMenuProps: dropDownMenuProps
  }, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
    classes: classes
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
    id: "dot-menu"
  })));
};

__signature__(ActionMenu, "useStyles{classes}", function () {
  return [useStyles];
});

__signature__(ActionMenu, "useStyles{classes}", function () {
  return [useStyles];
});

var _default = ActionMenu;
var _default2 = _default;
var _default3 = _default2;
exports.default = _default3;
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js");
  reactHotLoader.register(ActionMenu, "ActionMenu", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();

;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js");
  reactHotLoader.register(ActionMenu, "ActionMenu", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();