'use strict';

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
require('react');
var classnames = require('classnames');
var index = require('./index-CNZKW5X0.js');
var Button = require('./Button.js');
var Dropdown = require('./Dropdown.js');
var jsxRuntime = require('react/jsx-runtime');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@bigbinary/neeto-cist');
require('qs');
require('ramda');
require('./en-B1i-pQJm.js');
require('./index-BgzkP01c.js');
require('@babel/runtime/helpers/toConsumableArray');
require('dayjs');
require('dayjs/plugin/localeData');
require('dayjs/plugin/utc');
require('dayjs/plugin/weekday');
require('dayjs/plugin/weekOfYear');
require('i18next');
require('react-router-dom');
require('./Spinner.js');
require('./Tooltip.js');
require('@tippyjs/react');
require('tippy.js');
require('@bigbinary/neeto-hotkeys');
require('./overlayManager.js');
require('./usePrefersReducedMotion-D2Ck84HM.js');
require('@bigbinary/neeto-icons/Down');
require('./useId-DXHUzdxd.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWithoutProperties);
var classnames__default = /*#__PURE__*/_interopDefault(classnames);

var _excluded = ["style", "size"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var BTN_STYLES = {
  primary: "primary"};
var BTN_SIZES = {
  medium: "medium"};
var ActionDropdown = function ActionDropdown(_ref) {
  var _ref$label = _ref.label,
    label = _ref$label === void 0 ? "" : _ref$label,
    _ref$buttonStyle = _ref.buttonStyle,
    buttonStyle = _ref$buttonStyle === void 0 ? BTN_STYLES.primary : _ref$buttonStyle,
    _ref$buttonSize = _ref.buttonSize,
    buttonSize = _ref$buttonSize === void 0 ? BTN_SIZES.medium : _ref$buttonSize,
    _ref$disabled = _ref.disabled,
    disabled = _ref$disabled === void 0 ? false : _ref$disabled,
    _ref$onClick = _ref.onClick,
    onClick = _ref$onClick === void 0 ? index.noop : _ref$onClick,
    _ref$buttonProps = _ref.buttonProps,
    _ref$buttonProps2 = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
    style = _ref$buttonProps2.style,
    size = _ref$buttonProps2.size,
    buttonProps = _objectWithoutProperties__default.default(_ref$buttonProps2, _excluded),
    _ref$className = _ref.className,
    className = _ref$className === void 0 ? "" : _ref$className,
    dropdownProps = _ref.dropdownProps,
    children = _ref.children,
    portalProps = _ref.portalProps;
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
    className: classnames__default.default(["neeto-ui-action-dropdown", className]),
    children: [/*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread({
      disabled: disabled,
      label: label,
      onClick: onClick,
      "data-testid": "action-dropdown-btn",
      size: size !== null && size !== void 0 ? size : buttonSize,
      style: style !== null && style !== void 0 ? style : buttonStyle
    }, buttonProps)), /*#__PURE__*/jsxRuntime.jsx(Dropdown, _objectSpread(_objectSpread({
      disabled: disabled,
      buttonProps: {
        size: size !== null && size !== void 0 ? size : buttonSize
      },
      buttonStyle: style !== null && style !== void 0 ? style : buttonStyle
    }, dropdownProps), {}, {
      dropdownProps: _objectSpread(_objectSpread({}, dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.dropdownProps), portalProps),
      children: children
    }))]
  });
};
ActionDropdown.Menu = Dropdown.Menu;
ActionDropdown.MenuItem = Dropdown.MenuItem;
ActionDropdown.Divider = Dropdown.Divider;

module.exports = ActionDropdown;
//# sourceMappingURL=ActionDropdown.js.map
