openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 769 B
JavaScript
import{n as e}from"./rolldown-runtime-DkW27tQK.js";var t,n;function r(){return(r=e((()=>{t=class{constructor(){this.presentedAlert=null,this.askedPresented=!1,this.listeners=new Set}get alert(){return this.admission?.isCurrent()===!1?null:this.presentedAlert}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}present(e,t){this.presentedAlert=e,this.admission=t,this.askedPresented=!1,this.emit()}dismiss(){this.presentedAlert=null,this.admission=void 0,this.emit()}askIfReady(e){let t=this.alert;!t||this.askedPresented||(this.askedPresented=!0,this.admission?e(t.question,this.admission,t.title):e(t.question))}emit(){for(let e of this.listeners)e()}},n=new t})))()}export{r as n,n as t};
//# sourceMappingURL=custodian-alert-store-C8M3qKFB.js.map