"use strict";

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

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

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

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

var _utils = require("../../../.storybook/utils");

var _SplitButton = _interopRequireDefault(require("./SplitButton"));

var _MenuDivider = _interopRequireDefault(require("../menu/MenuDivider"));

var _MenuItem = _interopRequireDefault(require("../menu/MenuItem"));

var handleButtonClick = function handleButtonClick() {
  console.log('clicked main button');
};

var handleMenuItemClick = function handleMenuItemClick() {
  console.log('clicked menu item');
};

var _default = {
  component: _SplitButton.default,
  title: (0, _utils.addStoryInGroup)(_utils.MID_LEVEL_BLOCKS, 'Split button')
};
exports.default = _default;

var DefaultStory = function DefaultStory(args) {
  return /*#__PURE__*/_react.default.createElement(_SplitButton.default, (0, _extends2.default)({}, args, {
    onButtonClick: handleButtonClick
  }), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
    onClick: handleMenuItemClick,
    label: "Main action"
  }), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
    onClick: handleMenuItemClick,
    label: "Via file upload",
    caption: "(.CVS, . XLS & .XLSX)"
  }), /*#__PURE__*/_react.default.createElement(_MenuDivider.default, null), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
    onClick: handleMenuItemClick,
    label: "Via Marketplace integrations"
  }));
};

exports.DefaultStory = DefaultStory;