import * as React from 'react';
import { boolean } from '@storybook/addon-knobs';
import Button from '../button/Button';
import Tooltip, { TooltipPosition, TooltipTheme } from './Tooltip';
import notes from './Tooltip.stories.md';

var addSpacing = function addSpacing(component) {
  return React.createElement("div", {
    style: {
      textAlign: 'center'
    }
  }, component);
};

export var topLeft = function topLeft() {
  return addSpacing(React.createElement(Tooltip, {
    position: TooltipPosition.TOP_LEFT,
    text: "tooltips are constrained to window by default so if you scroll until there is no room for this tooltip above the button, it will flip below the button"
  }, React.createElement(Button, null, "top-left")));
};
topLeft.story = {
  name: 'Top-left, basic'
};
export var topCenter = function topCenter() {
  return addSpacing(React.createElement(Tooltip, {
    text: "default tooltip with top-center positioning and default theme, works on disabled buttons"
  }, React.createElement(Button, {
    isDisabled: true
  }, "top-center")));
};
topCenter.story = {
  name: 'Top-center, disabled button'
};
export var calloutTheme = function calloutTheme() {
  return addSpacing(React.createElement(Tooltip, {
    position: TooltipPosition.TOP_RIGHT,
    text: "callout theme",
    theme: TooltipTheme.CALLOUT
  }, React.createElement(Button, null, "Callout")));
};
calloutTheme.story = {
  name: 'Top-right, callout theme'
};
export var withCloseButton = function withCloseButton() {
  return addSpacing(React.createElement(Tooltip, {
    isShown: boolean('isShown', true),
    position: TooltipPosition.MIDDLE_RIGHT,
    showCloseButton: true,
    text: "callout theme",
    theme: TooltipTheme.CALLOUT
  }, React.createElement(Button, null, "Callout With Close Button")));
};
withCloseButton.story = {
  name: 'Middle-right, callout theme, force shown with close button'
};
export var errorTheme = function errorTheme() {
  return addSpacing(React.createElement(Tooltip, {
    isShown: boolean('isShown', true),
    position: TooltipPosition.TOP_RIGHT,
    text: "error theme",
    theme: TooltipTheme.ERROR
  }, React.createElement(Button, null, "top-right")));
};
errorTheme.story = {
  name: 'Top-right, error theme'
};
export var withLongText = function withLongText() {
  return addSpacing(React.createElement(Tooltip, {
    position: TooltipPosition.MIDDLE_LEFT,
    text: "this is a long tooltip that will addSpacing past 200px width, add a tooltipClass to override"
  }, React.createElement(Button, null, "middle-left")));
};
withLongText.story = {
  name: 'Middle-left, long tooltip text'
};
export var shownByDefault = function shownByDefault() {
  return addSpacing(React.createElement(Tooltip, {
    isShown: boolean('isShown', true),
    position: TooltipPosition.MIDDLE_RIGHT,
    text: "controlled tooltip that is shown based only on the isShown prop"
  }, React.createElement(Button, null, "middle-right")));
};
shownByDefault.story = {
  name: 'Middle-right, isShown prop set to true'
};
export var bottomLeft = function bottomLeft() {
  return addSpacing(React.createElement(Tooltip, {
    position: TooltipPosition.BOTTOM_LEFT,
    text: "bottom-left positioning"
  }, React.createElement(Button, null, "bottom-left")));
};
bottomLeft.story = {
  name: 'Bottom-left'
};
export var bottomCenter = function bottomCenter() {
  return addSpacing(React.createElement(Tooltip, {
    position: TooltipPosition.BOTTOM_CENTER,
    text: "bottom-center positioning"
  }, React.createElement(Button, null, "bottom-center")));
};
bottomCenter.story = {
  name: 'Bottom-center'
};
export var bottomRight = function bottomRight() {
  return addSpacing(React.createElement(Tooltip, {
    isShown: true,
    position: TooltipPosition.BOTTOM_RIGHT,
    showCloseButton: true,
    text: "bottom-right positioning with text that spans multiple lines and has a close button"
  }, React.createElement(Button, null, "bottom-right")));
};
bottomRight.story = {
  name: 'Bottom-right'
};
export default {
  title: 'Components|Tooltip',
  component: Tooltip,
  parameters: {
    notes: notes
  }
};
//# sourceMappingURL=Tooltip.stories.js.map