"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MixinsStackee = exports.MixinsSpacing = exports.AsButtonDisabledSm = exports.AsButtonLoadingSm = exports.AsButtonSm = exports.AsLinkSm = exports.AsButtonDisabled = exports.AsButtonLoading = exports.AsButton = exports.AsLink = exports["default"] = void 0;

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

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

var _button = require("./button.component");

var _marginChecker = require("../../../mixins/spacing/story-support/margin-checker");

var _paddingChecker = require("../../../mixins/spacing/story-support/padding-checker");

var _stackeeChecker = require("../../../mixins/stackee/story-support/stackee-checker");

var _button2 = _interopRequireDefault(require("./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: _button.Button,
  title: 'Components/Actions/Primary Button',
  parameters: {
    docs: {
      page: _button2["default"]
    }
  }
};
exports["default"] = _default;
var DEFAULT_PROPS_CLICK = {
  onClick: (0, _addonActions.action)('clicked'),
  size: 'md'
};
var DEFAULT_PROPS_HREF = {
  href: 'https://google.com',
  size: 'md'
};

var AsLink = function AsLink() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, DEFAULT_PROPS_HREF, "Go to Google");
};

exports.AsLink = AsLink;

var AsButton = function AsButton() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, DEFAULT_PROPS_CLICK, "Click me");
};

exports.AsButton = AsButton;

var AsButtonLoading = function AsButtonLoading() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, _extends({}, DEFAULT_PROPS_CLICK, {
    isLoading: true
  }), "Click me");
};

exports.AsButtonLoading = AsButtonLoading;

var AsButtonDisabled = function AsButtonDisabled() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, _extends({}, DEFAULT_PROPS_CLICK, {
    disabled: true
  }), "Click me");
};

exports.AsButtonDisabled = AsButtonDisabled;

var AsLinkSm = function AsLinkSm() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, _extends({}, DEFAULT_PROPS_HREF, {
    size: "sm"
  }), "Go to Google");
};

exports.AsLinkSm = AsLinkSm;

var AsButtonSm = function AsButtonSm() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, _extends({}, DEFAULT_PROPS_CLICK, {
    size: "sm"
  }), "Click me");
};

exports.AsButtonSm = AsButtonSm;

var AsButtonLoadingSm = function AsButtonLoadingSm() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, _extends({}, DEFAULT_PROPS_CLICK, {
    size: "sm",
    isLoading: true
  }), "Click me");
};

exports.AsButtonLoadingSm = AsButtonLoadingSm;

var AsButtonDisabledSm = function AsButtonDisabledSm() {
  return /*#__PURE__*/_react["default"].createElement(_button.Button, _extends({}, DEFAULT_PROPS_CLICK, {
    size: "sm",
    disabled: true
  }), "Click me");
};

exports.AsButtonDisabledSm = AsButtonDisabledSm;

var MixinsSpacing = function MixinsSpacing() {
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_marginChecker.MarginChecker, _extends({
    Component: _button.Button
  }, DEFAULT_PROPS_CLICK), "Click me"), /*#__PURE__*/_react["default"].createElement(_paddingChecker.PaddingChecker, _extends({
    Component: _button.Button
  }, DEFAULT_PROPS_CLICK), "Click me"));
};

exports.MixinsSpacing = MixinsSpacing;

var MixinsStackee = function MixinsStackee() {
  return /*#__PURE__*/_react["default"].createElement(_stackeeChecker.StackeeChecker, _extends({
    Component: _button.Button
  }, DEFAULT_PROPS_CLICK), "Click me");
};

exports.MixinsStackee = MixinsStackee;