"use strict";

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.withTextAndIcon = exports.withIcon = exports.withCustomElement = exports.default = exports.WithText = void 0;

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

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

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

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

var _uiIcons = require("@teamleader/ui-icons");

var _Button = _interopRequireDefault(require("./Button"));

var _excluded = ["size"];
var _default = {
  component: _Button.default,
  title: (0, _utils.addStoryInGroup)(_utils.LOW_LEVEL_BLOCKS, 'Button'),
  parameters: {
    design: {
      type: 'figma',
      url: 'https://www.figma.com/file/LHH25GN90ljQaBEUNMsdJn/Desktop-components?node-id=225%3A2'
    }
  }
};
exports.default = _default;

var withTextAndIcon = function withTextAndIcon(_ref) {
  var size = _ref.size,
      args = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  return /*#__PURE__*/_react.default.createElement(_Button.default, (0, _extends2.default)({}, args, {
    size: size,
    icon: size === 'tiny' || size === 'small' ? /*#__PURE__*/_react.default.createElement(_uiIcons.IconAddSmallOutline, null) : /*#__PURE__*/_react.default.createElement(_uiIcons.IconAddMediumOutline, null)
  }));
};

exports.withTextAndIcon = withTextAndIcon;
withTextAndIcon.args = {
  label: 'Button with icon and text'
};
withTextAndIcon.storyName = 'With text and icon';

var WithText = function WithText() {
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
    label: "Button with text"
  });
};

exports.WithText = WithText;
WithText.storyName = 'With text';

var withIcon = function withIcon() {
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
    icon: /*#__PURE__*/_react.default.createElement(_uiIcons.IconAddMediumOutline, null)
  });
};

exports.withIcon = withIcon;
withIcon.storyName = 'With icon';

var withCustomElement = function withCustomElement() {
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
    element: "a",
    label: "Button with custom element"
  });
};

exports.withCustomElement = withCustomElement;
withCustomElement.storyName = 'With custom element';