"use strict";

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

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

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

var _nextButton = require("./next-button.component");

var _nextButton2 = _interopRequireDefault(require("./next-button.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: _nextButton.NextButton,
  title: 'Wizard Buttons/Next Button',
  parameters: {
    fileName: __filename,
    docs: {
      page: _nextButton2["default"]
    }
  }
};
exports["default"] = _default;

var logSubmit = function logSubmit(e) {
  (0, _addonActions.action)('NEXT')();
  e.preventDefault();
};

var Form = function Form(_ref) {
  var children = _ref.children;
  return /*#__PURE__*/_react["default"].createElement("form", {
    onSubmit: logSubmit
  }, children);
};

var DEFAULT_PROPS = {
  /* Add default props here */
};

var Default = function Default() {
  return /*#__PURE__*/_react["default"].createElement(Form, null, /*#__PURE__*/_react["default"].createElement(_nextButton.NextButton, DEFAULT_PROPS, "Press Enter"));
};

exports.Default = Default;

var Disabled = function Disabled() {
  return /*#__PURE__*/_react["default"].createElement(Form, null, /*#__PURE__*/_react["default"].createElement(_nextButton.NextButton, _extends({}, DEFAULT_PROPS, {
    disabled: true
  }), "Press Enter"));
};

exports.Disabled = Disabled;