import { t as e } from "./wt-icon-y89gRcOs.js";
import { i as t, l as n } from "./enums-De8CDKZ1.js";
import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, normalizeProps as d, normalizeStyle as f, openBlock as p, resolveComponent as m, toDisplayString as h, unref as g, useAttrs as _, withCtx as v } from "vue";
//#region node_modules/mitt/dist/mitt.mjs
function y(e) {
	return {
		all: e ||= /* @__PURE__ */ new Map(),
		on: function(t, n) {
			var r = e.get(t);
			r ? r.push(n) : e.set(t, [n]);
		},
		off: function(t, n) {
			var r = e.get(t);
			r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e.set(t, []));
		},
		emit: function(t, n) {
			var r = e.get(t);
			r && r.slice().map(function(e) {
				e(n);
			}), (r = e.get("*")) && r.slice().map(function(e) {
				e(t, n);
			});
		}
	};
}
//#endregion
//#region src/scripts/eventBus.js
var b = y(), x = {
	$on: (...e) => b.on(...e),
	$off: (...e) => b.off(...e),
	$emit: (...e) => b.emit(...e)
}, S = { class: "p-toast-message-text" }, C = { class: "p-toast-summary" }, w = {
	key: 0,
	class: "p-toast-detail"
}, T = /* @__PURE__ */ l({
	name: "WtToast",
	inheritAttrs: !1,
	__name: "wt-toast",
	setup(l) {
		let y = _(), b = {
			success: "done",
			info: "rounded-info",
			warn: "warning",
			error: "error"
		}, x = {
			success: t.SUCCESS,
			info: t.INFO,
			warn: t.WARN,
			error: t.ERROR,
			contrast: t.CONTRAST,
			secondary: t.SECONDARY
		}, T = (e) => `fill: var(--p-toast-${x[e.severity]}-icon-color)`;
		return (t, l) => {
			let _ = m("p-toast");
			return p(), i(_, d(u(g(y))), {
				message: v(({ message: t }) => [t ? (p(), o(r, { key: 0 }, [c(e, {
					icon: b[t.severity] ?? "",
					style: f(T(t)),
					class: "p-toast-message-icon"
				}, null, 8, ["icon", "style"]), s("div", S, [s("span", C, h(t.summary), 1), t.detail ? (p(), o("div", w, h(t.detail), 1)) : a("", !0)])], 64)) : a("", !0)]),
				closeicon: v(() => [c(e, {
					icon: "close",
					size: g(n).SM
				}, null, 8, ["size"])]),
				_: 1
			}, 16);
		};
	}
});
//#endregion
export { x as n, T as t };
