import{$ as f,g as c}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-4WGLXVPZ.js";import{b as d}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-GFXNKJ5U.js";import{a as u}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-34QOOIQ4.js";import{a as n}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-LL6AKNEK.js";import{a as b}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-LQ2PFFE3.js";import{d as s}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-H7QMOPDN.js";var o=s(b());var t=s(n()),k=({tip:m,optionTip:p,className:v,children:x})=>{let[h,e]=(0,o.useState)(!1),[r,R]=(0,o.useState)(!1),a=(0,o.useRef)(null),i=()=>{R(!1)};return(0,o.useEffect)(()=>{let l;return l=setTimeout(()=>{r&&e(!0)},70),()=>{clearTimeout(l)}},[r]),(0,t.jsx)(d,{excludedRef:a,onOutsideClick:()=>e(!1),children:(0,t.jsxs)("div",{className:"relative flex cursor-pointer",ref:a,onClick:()=>e(!0),onMouseLeave:()=>e(!1),children:[(0,t.jsx)(c,{src:f.alert,width:16,aspectRatio:1,className:"aspect-square h-4 w-4 min-w-[16px]",onMouseOver:()=>{e(!0)},onMouseLeave:i,alt:"tip"}),h&&(0,t.jsx)("div",{className:u("absolute top-2 z-50 flex w-max max-w-[250px] rounded border-2 border-GREY_THREE bg-white p-3 font-inter text-black",p?"right-4 md:left-4 md:right-auto":"left-4",v),children:m}),(0,t.jsx)("button",{style:{display:"contents"},onMouseOver:()=>{e(!0)},onFocus:()=>{e(!0)},onMouseLeave:i,children:x})]})})};export{k as a};