"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Tooltip_stories_exports = {};
__export(Tooltip_stories_exports, {
  Tooltip: () => Tooltip,
  default: () => Tooltip_stories_default
});
module.exports = __toCommonJS(Tooltip_stories_exports);
var import_react = __toESM(require("react"));
var import_Text = __toESM(require("../../asorted/Text"));
var import_Flex = __toESM(require("../../layout/Flex"));
var import_index = __toESM(require("./index"));
const description = `
### Tooltips display informative text when users hover over an element.

This component is based on [tippyjs](https://atomiks.github.io/tippyjs/) which is powerful library.
Please check [the documentation](https://github.com/atomiks/tippyjs-react#-props) for the full props list and usage.

## Usage

\`\`\`js

import { Tooltip } from "@ledgerhq/react-ui"

\`\`\`

Wrap some jsx that will make the tooltip visible on mouse over.<br/>
_**Note:** this jsx will automatically be wrapped inside a \`span\` element if the ref cannot be forwarded. See [here](https://github.com/atomiks/tippyjs-react#component-children) for a detailed explanation._

To set the tooltip inner contents, use the \`content\` prop.

\`\`\`js
<Tooltip content="Hello!" {...props}>
  <div>Hover me</div>
</Tooltip>
\`\`\`

## Sandbox

Placement, style and content can be customized using props as demonstrated in the following example.
`;
var Tooltip_stories_default = {
  title: "Messages/Tooltip",
  component: import_index.default,
  parameters: {
    docs: {
      description: {
        component: description
      }
    }
  },
  argTypes: {
    content: { type: "string" },
    visible: { options: [true, false, void 0] },
    disabled: { type: "boolean" },
    placement: {
      control: { type: "radio" },
      options: [
        "top",
        "top-start",
        "top-end",
        "right",
        "right-start",
        "right-end",
        "bottom",
        "bottom-start",
        "bottom-end",
        "left",
        "left-start",
        "left-end",
        "auto",
        "auto-start",
        "auto-end"
      ]
    }
  },
  args: {
    content: "Hello World!"
  }
};
const Tooltip = (args) => /* @__PURE__ */ import_react.default.createElement(import_Flex.default, { alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ import_react.default.createElement(import_index.default, { ...args }, /* @__PURE__ */ import_react.default.createElement("div", { style: { margin: "50px" } }, /* @__PURE__ */ import_react.default.createElement(
  import_Text.default,
  {
    as: "div",
    fontWeight: "semiBold",
    color: "neutral.c100",
    style: { border: "2px solid #AAA", borderRadius: "5px" },
    p: 10,
    textAlign: "center"
  },
  "Hover",
  /* @__PURE__ */ import_react.default.createElement("br", null),
  "me"
))));
//# sourceMappingURL=Tooltip.stories.js.map
