"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.WithIcon = exports.Dark = exports.Regular = exports.default = void 0;

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

var _Tooltip = _interopRequireDefault(require("./Tooltip"));

var _README = _interopRequireDefault(require("./README.mdx"));

var _iconsReact = require("@wfp/icons-react");

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 = {
  title: 'Components/UI Elements/Tooltip',
  component: _Tooltip.default,
  parameters: {
    status: 'released',
    mdx: _README.default
  }
};
exports.default = _default;

var Regular = function Regular(args) {
  return /*#__PURE__*/_react.default.createElement(_Tooltip.default // options
  , args, "Hover here to show tooltip");
};

exports.Regular = Regular;
Regular.args = {
  content: 'Label text',
  children: 'This is a helper text'
};

var Dark = function Dark(args) {
  return /*#__PURE__*/_react.default.createElement(_Tooltip.default // options
  , _extends({}, args, {
    trigger: "click"
  }), /*#__PURE__*/_react.default.createElement("span", null, "Click here to show tooltip"));
};

exports.Dark = Dark;
Dark.args = {
  content: 'Label text',
  children: 'This is a helper text',
  dark: true
};
Dark.story = {
  parameters: {
    docs: {
      storyDescription: "Use the `dark` style as an alternative for small tooltips"
    }
  }
};

var WithIcon = function WithIcon(args) {
  return /*#__PURE__*/_react.default.createElement(_Tooltip.default, _extends({}, args, {
    trigger: "click",
    placement: 'bottom',
    createRefWrapper: true,
    content: "Label Text"
  }), /*#__PURE__*/_react.default.createElement(_iconsReact.MenuGlyph, {
    description: "options"
  }));
};

exports.WithIcon = WithIcon;
WithIcon.story = {
  parameters: {
    docs: {
      storyDescription: "By using the `createRefWrapper` prop a html element around the trigger will be added. This is useful for components without `forwardRef` support."
    }
  }
};
WithIcon.args = {
  content: 'Label text',
  children: 'This is a helper text'
};