import _extends from "@babel/runtime/helpers/extends";
import { IconHelpBadgedMediumOutline } from '@teamleader/ui-icons';
import React from 'react';
import { addStoryInGroup, LOW_LEVEL_BLOCKS } from '../../../.storybook/utils';
import { LARGE, MEDIUM, SMALL } from '../../constants/sizes';
import { Badge, Button, Link, StatusLabel, TextBody, TextDisplay, TextSmall, Tooltip } from '../../index';
import { POSITIONS } from './Tooltip';
var sizes = [SMALL, MEDIUM, LARGE];
var colors = ['white', 'neutral', 'mint', 'violet', 'ruby', 'gold', 'aqua', 'inverse'];
var TooltippedButton = Tooltip(Button);
var TooltippedBadge = Tooltip(Badge);
var TooltippedLink = Tooltip(Link);
var TooltippedStatusLabel = Tooltip(StatusLabel);
var TooltippedStrong = Tooltip('strong');
var textBodyTooltipContent = /*#__PURE__*/React.createElement(TextBody, null, "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.");
var textSmallTooltipContent = /*#__PURE__*/React.createElement(TextSmall, null, "I am small sized tooltip text with lorem ipsum text and so many more!");
var defaultTooltipProps = {
  tooltipColor: 'white',
  tooltipPosition: 'horizontal',
  tooltipSize: 'medium',
  tooltipActive: null
};
var tooltipArgTypes = {
  tooltipColor: {
    control: 'select',
    options: colors
  },
  tooltipPosition: {
    control: 'select',
    options: POSITIONS
  },
  tooltipSize: {
    control: 'select',
    options: sizes
  },
  tooltipActive: {
    control: 'select',
    options: [null, true, false]
  }
};
export default {
  component: Tooltip,
  title: addStoryInGroup(LOW_LEVEL_BLOCKS, 'Tooltip'),
  parameters: {
    info: {
      propTablesExclude: [TextSmall, TextDisplay, TextBody]
    }
  }
};
export var basic = function basic(args) {
  return /*#__PURE__*/React.createElement(TooltippedButton, _extends({}, args, {
    tooltip: textBodyTooltipContent
  }), "Hover me to see a tooltip");
};
basic.args = defaultTooltipProps;
basic.argTypes = tooltipArgTypes;
export var withIcon = function withIcon(args) {
  return /*#__PURE__*/React.createElement(TextDisplay, null, /*#__PURE__*/React.createElement(TooltippedStrong, _extends({}, args, {
    tooltip: textSmallTooltipContent,
    tooltipIcon: /*#__PURE__*/React.createElement(IconHelpBadgedMediumOutline, null)
  }), "Hover me"));
};
withIcon.args = defaultTooltipProps;
withIcon.argTypes = tooltipArgTypes;
export var fromBadge = function fromBadge(args) {
  return /*#__PURE__*/React.createElement(TextDisplay, null, "I'm display text with a", ' ', /*#__PURE__*/React.createElement(TooltippedBadge, _extends({}, args, {
    tooltip: textSmallTooltipContent
  }), "Hover me"), ' ', "tooltip action");
};
fromBadge.args = defaultTooltipProps;
fromBadge.argTypes = tooltipArgTypes;
export var fromButton = function fromButton(args) {
  return /*#__PURE__*/React.createElement(TooltippedButton, _extends({}, args, {
    tooltip: textBodyTooltipContent
  }), "Hover me");
};
fromButton.args = defaultTooltipProps;
fromButton.argTypes = tooltipArgTypes;
export var fromLink = function fromLink(args) {
  return /*#__PURE__*/React.createElement(TooltippedLink, _extends({}, args, {
    tooltip: textBodyTooltipContent,
    href: "#",
    inherit: false
  }), "Hover me");
};
fromLink.args = defaultTooltipProps;
fromLink.argTypes = tooltipArgTypes;
export var fromStatusLabel = function fromStatusLabel(args) {
  return /*#__PURE__*/React.createElement(TooltippedStatusLabel, _extends({}, args, {
    tooltip: textSmallTooltipContent
  }), "Hover me");
};
fromStatusLabel.storyName = 'From StatusLabel';
fromStatusLabel.args = defaultTooltipProps;
fromStatusLabel.argTypes = tooltipArgTypes;
export var fromInlineElements = function fromInlineElements(args) {
  return /*#__PURE__*/React.createElement(TextBody, null, "I'm body text with a", ' ', /*#__PURE__*/React.createElement(TooltippedStrong, _extends({}, args, {
    tooltip: textBodyTooltipContent
  }), "Hover me"), ' ', "tooltip action");
};
fromInlineElements.storyName = 'From inline elements';
fromInlineElements.args = defaultTooltipProps;
fromInlineElements.argTypes = tooltipArgTypes;