define(["require","exports","vue","./dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd","../utils/system.amd"],(function(k,s,t,i,l){"use strict";if(typeof t>"u")var t=window.Vue;class u{resolve;worker=t.ref(null);constructor(e){this.resolve=e}async get(){if(this.worker.value)return this.worker.value;const r=(await this.resolve()).default;this.worker.value=n(r);const a=this.worker.value;return await l.waitWhile(()=>!a.isMounted),a}async open(...e){await(await this.get()).open(...e)}async openAsLink(...e){(await this.get()).openAsLink(...e)}async close(...e){(await this.get()).close(...e)}async destroy(...e){(await this.get()).destroy(...e)}async setProps(...e){await(await this.get()).setProps(...e)}}const c=()=>{const o=t.getCurrentInstance();if(o?.type?.id){const e=i.getDialogWorker(o.type.id);if(e)return e}return t.inject("dialogWorker")},n=o=>i.addDialogWorker(o),w=o=>new u(o);s.useAsyncTopDialog=w,s.useTopDialog=n,s.useTopDialogSelf=c}));
//# sourceMappingURL=utils-CWn_G7OO.amd.js.map
