"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MixinsSpacing = exports.RightIconWithOnClick = exports.RightIcon = exports.LeftIcon = exports["default"] = void 0;

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

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

var _textButtonWithIcon = require("./text-button-with-icon.component");

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

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

var _textButtonWithIcon2 = _interopRequireDefault(require("./text-button-with-icon.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: _textButtonWithIcon.TextButtonWithIcon,
  title: 'Components/Actions/Text Button With Icon',
  parameters: {
    docs: {
      page: _textButtonWithIcon2["default"]
    }
  }
};
exports["default"] = _default;
var DEFAULT_PROPS = {
  href: 'https://www.google.com',
  icon: 'add',
  position: 'left'
};

var LeftIcon = function LeftIcon() {
  return /*#__PURE__*/_react["default"].createElement(_textButtonWithIcon.TextButtonWithIcon, _extends({}, DEFAULT_PROPS, {
    icon: "add",
    position: "left"
  }), "Icon To Left");
};

exports.LeftIcon = LeftIcon;

var RightIcon = function RightIcon() {
  return /*#__PURE__*/_react["default"].createElement(_textButtonWithIcon.TextButtonWithIcon, _extends({}, DEFAULT_PROPS, {
    icon: "small-arrow-right",
    position: "right"
  }), "Icon To Right");
};

exports.RightIcon = RightIcon;

var RightIconWithOnClick = function RightIconWithOnClick() {
  return /*#__PURE__*/_react["default"].createElement(_textButtonWithIcon.TextButtonWithIcon, {
    onClick: (0, _addonActions.action)('onClick'),
    icon: "small-arrow-right",
    position: "right"
  }, "Icon To Right (onClick)");
};

exports.RightIconWithOnClick = RightIconWithOnClick;

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

exports.MixinsSpacing = MixinsSpacing;