vuestic-ui
Version:
Vue 3 UI Framework
25 lines (24 loc) • 857 B
JavaScript
import { c as createToastInstance, a as closeById, b as closeAllNotifications } from "../toast.mjs";
import { d as defineVuesticPlugin } from "../../../services/vue-plugin/utils/define-vuestic-plugin.mjs";
import { d as defineGlobalProperty } from "../../../services/vue-plugin/utils/global-properties.mjs";
const createVaToastPlugin = (app) => ({
/** Returns toast instance id */
init(options) {
return createToastInstance(options, app == null ? void 0 : app._context);
},
close(id) {
closeById(id);
},
closeAll(allApps = false) {
closeAllNotifications(allApps ? void 0 : app == null ? void 0 : app._context);
}
});
const VaToastPlugin = defineVuesticPlugin(() => ({
install(app) {
defineGlobalProperty(app, "$vaToast", createVaToastPlugin(app));
}
}));
export {
VaToastPlugin as V
};
//# sourceMappingURL=index.mjs.map