import{t as e}from"./defineProperty-BbfpZ9Tg.js";import{a as t}from"./jsx-runtime-DHSfUA5-.js";import{F as n,I as r,K as i,P as a,U as o}from"./test.id-DxQrYxPk.js";import{r as s,t as c}from"./WorkbenchOverlayService-D9CSrozm.js";var l,u=l=class{static create(e,n){let r=n.invokeFunction(e=>e.get(c));return r.removeOverlayById(s.successToast),r.createOverlay(`top-tips`,s.topTips,t.topTips,t=>n.createInstance(l,e,t))}constructor(t,n,r){e(this,`options`,void 0),e(this,`workbenchOverlayService`,void 0),e(this,`_onStatusChange`,new o),e(this,`onStatusChange`,this._onStatusChange.event),e(this,`zIndex`,void 0),e(this,`instanceId`,void 0),e(this,`timer`,void 0),e(this,`disposed`,!1),this.options=t,this.workbenchOverlayService=r,this.zIndex=n.zIndex,this.instanceId=n.instanceId,this.timer=setTimeout(()=>this.dispose(),this.durationMs)}get message(){return this.options.message}get durationMs(){return this.options.durationMs??3e3}get testId(){return this.options.testId}dispose(){this.disposed||(this.disposed=!0,clearTimeout(this.timer),this.workbenchOverlayService.removeOverlay(this.instanceId))}};u=l=n([r(2,c)],u);function d(){let e=a(i);return t=>u.create(t,e)}export{d as t};
//# sourceMappingURL=useTopTips-B9oW_JMO.js.map