import{cl as T,b as p,g as i,aQ as d}from"./index-DpP8vbvu.js";function l(){let o;const u=(r,t)=>{e(),o=window.setTimeout(r,t)},e=()=>window.clearTimeout(o);return T(()=>e()),{registerTimeout:u,cancelTimeout:e}}const y=p({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),C=({showAfter:o,hideAfter:u,autoClose:e,open:r,close:t})=>{const{registerTimeout:a}=l(),{registerTimeout:c,cancelTimeout:m}=l();return{onOpen:s=>{a(()=>{r(s);const n=i(e);d(n)&&n>0&&c(()=>{t(s)},n)},i(o))},onClose:s=>{m(),a(()=>{t(s)},i(u))}}};export{C as a,y as u};
