import { i as e } from "./enums-De8CDKZ1.js";
import { n as t, t as n } from "./wt-toast-DXrSMdRm.js";
import { createBlock as r, inject as i, onUnmounted as a, openBlock as o } from "vue";
import { useToast as s } from "primevue/usetoast";
//#region src/components/wt-toast/types/index.ts
var c = {
	success: e.SUCCESS,
	info: e.INFO,
	error: e.ERROR,
	warning: e.WARN
}, l = 4e3, u = /*@__PURE__*/ Object.assign({ name: "WtNotificationsBar" }, {
	__name: "wt-notifications-bar",
	setup(e) {
		let u = i("$eventBus", null) ?? t, d = s();
		function f({ type: e, text: t, timeout: n }) {
			d.add({
				severity: c[e],
				detail: t,
				life: n == null ? l : n * 1e3
			});
		}
		return u.$on("notification", f), a(() => {
			u.$off("notification", f);
		}), (e, t) => (o(), r(n, { position: "top-right" }));
	}
});
//#endregion
export { u as default };
