"use strict";

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

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

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

var _addonActions = require("@storybook/addon-actions");

var _contextMenu = require("./context-menu.component");

var _index = require("../../../primitives/index");

var _contextMenu2 = _interopRequireDefault(require("./context-menu.mdx"));

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var _default = {
  component: _contextMenu.ContextMenu,
  title: 'Navigation/Context Menu',
  parameters: {
    docs: {
      page: _contextMenu2["default"]
    }
  }
};
exports["default"] = _default;
var items = [{
  id: 'login',
  label: /*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage, {
    id: "Login as client"
  }),
  onSelect: (0, _addonActions.action)('Do login')
}, {
  id: 'invite',
  label: /*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage, {
    id: "Invite"
  }),
  onSelect: (0, _addonActions.action)('Do invite')
}, {
  id: 'custom color',
  label: /*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage, {
    id: "Custom Color"
  }),
  onSelect: (0, _addonActions.action)('Do invite'),
  textColorName: 'greyscale-medium'
}, {
  id: 'remove',
  label: /*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage, {
    id: "Remove client"
  }),
  onSelect: (0, _addonActions.action)('Do Remove'),
  danger: true
}];
var DEFAULT_PROPS = {
  justify: 'right',
  items: items,
  buttonLabel: 'open menu'
};

var Default = function Default() {
  return /*#__PURE__*/_react["default"].createElement(_index.Box, {
    colorName: "background",
    spacing: ['mb7', 'p7'],
    stacked: "row",
    justify: "center"
  }, /*#__PURE__*/_react["default"].createElement(_contextMenu.ContextMenu, DEFAULT_PROPS));
};

exports.Default = Default;

var Loading = function Loading() {
  return /*#__PURE__*/_react["default"].createElement(_index.Box, {
    colorName: "background",
    spacing: ['mb7', 'p7'],
    stacked: "row",
    justify: "center"
  }, /*#__PURE__*/_react["default"].createElement(_contextMenu.ContextMenu, _extends({}, DEFAULT_PROPS, {
    isLoading: true
  })));
};

exports.Loading = Loading;