import{j as t}from"./jsx-runtime-CnH95YSl.js";import{w as m,u}from"./index-BJMTVygn.js";import{a as d}from"./axeRun-B-LchFqf.js";import{O as R}from"./OdysseyStorybookThemeDecorator-BuDiOG2V.js";import{M as o}from"./Tooltip-CsVWtVfL.js";import{M as E}from"./Button-BEA5U6Tg.js";import{M}from"./Download-Zlhupksh.js";import{M as L}from"./Status-BlOUycBm.js";import{M as r}from"./Tag-DwH0t814.js";import"./index-NdkWRN8K.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./axe-4JP0vCEZ.js";import"./OdysseyThemeProvider-Bh0Bu-2o.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-qIn9QVYS.js";import"./MuiPropsContext-DhRylJZk.js";import"./Tooltip-Cq2rQGbD.js";import"./Grow-C8kUeGCY.js";import"./utils-kUZVaD1e.js";import"./inheritsLoose-CJ6Ie9dp.js";import"./index-B5xazMy1.js";import"./index-DieBXP3Z.js";import"./TransitionGroupContext-DAL84N7p.js";import"./useIsFocusVisible-DH0qxT5e.js";import"./getReactElementRef-DsIevm5t.js";import"./resolveComponentProps-DXQ8X87i.js";import"./isHostComponent-DVu5iVWx.js";import"./useControlled-NQulfz4l.js";import"./Popper-BARIxJrI.js";import"./popper-BVOCD5jc.js";import"./ownerDocument-DW-IO8s5.js";import"./Portal-C6D59xAE.js";import"./BaseButton-DYZHKnV3.js";import"./Button-BzIwUmSM.js";import"./ButtonBase-BNqa2TMD.js";import"./assertThisInitialized-B9jnkVVz.js";import"./Chip-CXnMieIl.js";import"./createSvgIcon-ClUWwDzL.js";const ht={component:o,decorators:[R],tags:["autodocs"],argTypes:{children:{control:"object",description:"The content that will trigger the tooltip",table:{type:{summary:"ReactElement"}},type:{required:!0,name:"other",value:"ReactElement"}},ariaType:{options:["description","label"],control:{type:"radio"},description:"The type of ARIA attribute to use",table:{type:{summary:"description | label"}},type:{required:!0,name:"other",value:"radio"}},text:{control:"text",description:"The text to display in the tooltip",table:{type:{summary:"string"}},type:{required:!0,name:"string"}},placement:{options:["top","right","bottom","left"],control:{type:"radio"},description:"The placement of the tooltip",table:{type:{summary:"top | right | bottom | left"},defaultValue:{summary:"top"}}}},args:{ariaType:"label"}},y={args:{},render:function(e){return t.jsx(o,{ariaType:e.ariaType,placement:e.placement,text:e.text,children:e.children})}},z=a=>({canvasElement:e,step:c})=>c("show the tooltip on hover",async()=>{const I=m(e).getByText("Launch");await u.hover(I),await d(a)}),i={...y,args:{children:t.jsx(E,{label:"Launch",variant:"primary"}),ariaType:"description",placement:"top",text:"This will begin a 10-second countdown"},play:z("Tooltip Default")},l={...y,args:{children:t.jsx(E,{ariaLabel:"Download logs",startIcon:t.jsx(M,{}),variant:"secondary"}),ariaType:"label",placement:"top",text:"Download logs"},play:async({canvasElement:a,step:e})=>{await e("tooltip text",async()=>{const n=m(a).getByRole("button");await u.hover(n),await d("Tooltip Icon Button")})}},p={...y,args:{children:t.jsx(L,{label:"Warp drive online",severity:"success"}),ariaType:"label",placement:"top",text:"The warp drive is currently online."},play:async({canvasElement:a,step:e})=>{await e("tooltip text",async()=>{const n=m(a).getByLabelText("The warp drive is currently online.");await u.hover(n),await d("Tooltip Icon Button")})}},s={args:{},render:()=>t.jsxs(t.Fragment,{children:[t.jsx(o,{ariaType:"label",placement:"top",text:"Top",children:t.jsx(r,{label:"Bow"})}),t.jsx(o,{ariaType:"label",placement:"left",text:"Left",children:t.jsx(r,{label:"Stern"})}),t.jsx(o,{ariaType:"label",placement:"bottom",text:"Bottom",children:t.jsx(r,{label:"Port"})}),t.jsx(o,{ariaType:"label",placement:"right",text:"Right",children:t.jsx(r,{label:"Starboard"})})]})};var T,b,h;i.parameters={...i.parameters,docs:{...(T=i.parameters)==null?void 0:T.docs,source:{originalSource:`{
  ...Template,
  args: {
    children: <Button label="Launch" variant="primary" />,
    ariaType: "description",
    placement: "top",
    text: "This will begin a 10-second countdown"
  },
  play: showTooltip("Tooltip Default")
}`,...(h=(b=i.parameters)==null?void 0:b.docs)==null?void 0:h.source}}};var x,g,w;l.parameters={...l.parameters,docs:{...(x=l.parameters)==null?void 0:x.docs,source:{originalSource:`{
  ...Template,
  args: {
    children: <Button ariaLabel="Download logs" startIcon={<DownloadIcon />} variant="secondary" />,
    ariaType: "label",
    placement: "top",
    text: "Download logs"
  },
  play: async ({
    canvasElement,
    step
  }) => {
    await step("tooltip text", async () => {
      const canvas = within(canvasElement);
      const button = canvas.getByRole("button");
      await userEvent.hover(button);
      await axeRun("Tooltip Icon Button");
    });
  }
}`,...(w=(g=l.parameters)==null?void 0:g.docs)==null?void 0:w.source}}};var v,f,B;p.parameters={...p.parameters,docs:{...(v=p.parameters)==null?void 0:v.docs,source:{originalSource:`{
  ...Template,
  args: {
    children: <Status label="Warp drive online" severity="success" />,
    ariaType: "label",
    placement: "top",
    text: "The warp drive is currently online."
  },
  play: async ({
    canvasElement,
    step
  }) => {
    await step("tooltip text", async () => {
      const canvas = within(canvasElement);
      const button = canvas.getByLabelText("The warp drive is currently online.");
      await userEvent.hover(button);
      await axeRun("Tooltip Icon Button");
    });
  }
}`,...(B=(f=p.parameters)==null?void 0:f.docs)==null?void 0:B.source}}};var j,S,D;s.parameters={...s.parameters,docs:{...(j=s.parameters)==null?void 0:j.docs,source:{originalSource:`{
  args: {} as TooltipProps,
  // This is a hack.
  render: () => <>
      <Tooltip ariaType="label" placement="top" text="Top">
        <Tag label="Bow" />
      </Tooltip>

      <Tooltip ariaType="label" placement="left" text="Left">
        <Tag label="Stern" />
      </Tooltip>

      <Tooltip ariaType="label" placement="bottom" text="Bottom">
        <Tag label="Port" />
      </Tooltip>

      <Tooltip ariaType="label" placement="right" text="Right">
        <Tag label="Starboard" />
      </Tooltip>
    </>
}`,...(D=(S=s.parameters)==null?void 0:S.docs)==null?void 0:D.source}}};const xt=["Default","IconButton","StatusWrapper","Placement"];export{i as Default,l as IconButton,s as Placement,p as StatusWrapper,xt as __namedExportsOrder,ht as default};
