import{a as e,n as t}from"./chunk-BneVvdWh.js";import{t as n}from"./react-C7IZe2D1.js";import{ht as r,t as i}from"./dist-DtfJeYQK.js";import{t as a}from"./jsx-runtime-C2wGStra.js";import{S as o,St as s,_ as c,b as l,g as u,m as d,v as f,x as p,y as m}from"./iframe-D-oZzXNK.js";import{n as h,t as g}from"./dist-Cc1j9Pjk.js";var _,v,y,b,x,S=t((()=>{_=`content__gY3d-`,v=`appear__qG9VZ`,y=`disappear__XUTLV`,b=`arrow__PbWtY`,x={content:_,appear:v,disappear:y,arrow:b}})),C,w,T,E=t((()=>{C=e(n(),1),c(),S(),d(),i(),g(),w=a(),T=(0,C.forwardRef)(function({children:e,content:t,side:n=`top`,trigger:i=`hover`,disabled:a=!1,dataset:c,onOpenChange:d,...g},_){let v=u(),y=(0,C.useRef)(0),[b,S]=(0,C.useState)(!1),T=()=>{i!==`hover`&&(y.current=Date.now(),S(!0),d?.(!0))},E=()=>{i!==`hover`&&Date.now()-y.current>300&&(S(!1),d?.(!1))};if(a)return e;let D;D=i===`hover`?void 0:b||void 0;let O=D===void 0?{}:{open:D};return(0,w.jsxs)(p,{...O,delayDuration:300,onOpenChange:d,children:[(0,w.jsx)(s,{ref:_,...g,children:(0,w.jsx)(o,{onTouchStart:T,onTouchEnd:E,tabIndex:0,asChild:!0,children:e})}),(0,w.jsx)(l,{container:v,children:(0,w.jsxs)(m,{side:n,className:x.content,onPointerDownOutside:()=>S(!1),...r(c,{preplyDsComponent:h.Tooltip}),children:[t,(0,w.jsx)(f,{className:x.arrow,width:10,height:6})]})})]})});try{300 .displayName=`LONG_PRESS_DELAY`,300 .__docgenInfo={description:`Delay after touch start, after which tooltip will be closed immediately after release.`,displayName:`LONG_PRESS_DELAY`,props:{}}}catch{}try{T.displayName=`Tooltip`,T.__docgenInfo={description:`Tooltip component.

The direct child of the component should be html element, DS component,
or a component that forwards ref and spreads props to the underlying DOM node.`,displayName:`Tooltip`,props:{content:{defaultValue:null,description:``,name:`content`,required:!0,type:{name:`enum`,value:[{value:`undefined`},{value:`null`},{value:`string`},{value:`number`},{value:`false`},{value:`true`},{value:`ReactElement<any, string | JSXElementConstructor<any>>`},{value:`Iterable<ReactNode>`},{value:`ReactPortal`}]}},trigger:{defaultValue:{value:`hover`},description:`Controls how the tooltip can be triggered.

- 'hover' (default): Tooltip appears on hover
- 'hover-and-touch': Tooltip appears on hover and touch interactions

In both cases tooltip also appears on focus.`,name:`trigger`,required:!1,type:{name:`enum`,value:[{value:`"hover"`},{value:`"hover-and-touch"`}]}},disabled:{defaultValue:{value:`false`},description:`Disables tooltip completely.`,name:`disabled`,required:!1,type:{name:`enum`,value:[{value:`false`},{value:`true`}]}},side:{defaultValue:{value:`top`},description:`Preferred side of the tooltip to appear from. Use if default side might block important content.`,name:`side`,required:!1,type:{name:`enum`,value:[{value:`"top"`},{value:`"right"`},{value:`"bottom"`},{value:`"left"`}]}},onOpenChange:{defaultValue:null,description:``,name:`onOpenChange`,required:!1,type:{name:`enum`,value:[{value:`(open: boolean) => void`}]}},dataset:{defaultValue:null,description:``,name:`dataset`,required:!1,type:{name:`enum`,value:[{value:`Dataset`}]}}}}}catch{}}));export{E as n,T as t};