"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MixinsMarginOnlySpacing = 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 _marginChecker = require("../../../mixins/spacing/story-support/margin-checker");

var _nextButton2 = _interopRequireDefault(require("./next-button.mdx"));

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

var _default = {
  component: _nextButton.NextButton,
  title: 'Components/Actions/Next Button',
  parameters: {
    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 = function Default() {
  return /*#__PURE__*/_react["default"].createElement(Form, null, /*#__PURE__*/_react["default"].createElement(_nextButton.NextButton, null, "Press Enter"));
};

exports.Default = Default;

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

exports.Disabled = Disabled;

var MixinsMarginOnlySpacing = function MixinsMarginOnlySpacing() {
  return /*#__PURE__*/_react["default"].createElement(_marginChecker.MarginChecker, {
    Component: _nextButton.NextButton
  }, "Press Enter");
};

exports.MixinsMarginOnlySpacing = MixinsMarginOnlySpacing;