import "jb-notification";
var t = class extends HTMLElement {
constructor() {
super(), this.initWebComponent();
}
initWebComponent() {
const t = this.attachShadow({
mode: "open",
clonable: !0,
serializable: !0
}), e = document.createElement("template");
e.innerHTML = "\n\n
\n \n
\n ", t.appendChild(e.content.cloneNode(!0));
}
static get observedAttributes() {
return ["x-position", "y-position"];
}
attributeChangedCallback(t, e, i) {
this.onAttributeChange(t, i);
}
onAttributeChange(t, e) {}
};
customElements.get("jb-notification-wrapper") || window.customElements.define("jb-notification-wrapper", t);
var e = class {
#t;
get wrapperDom() {
return this.#t;
}
constructor() {
this.#e();
}
#e() {
const t = document.createElement("jb-notification-wrapper");
document.body.appendChild(t), this.#t = t;
}
#i(t) {
const { title: e, type: i, desc: o } = t, n = document.createElement("jb-notification");
return n.title = e, i && (n.type = i), o && (n.description = o), n.addEventListener("close", this.onNotificationClose.bind(this)), n;
}
new(t) {
const { title: e, type: i, desc: o } = t, n = this.#i({
title: e,
type: i,
desc: o
});
this.wrapperDom?.appendChild(n), n.show();
}
onNotificationClose(t) {
this.wrapperDom.removeChild(t.target);
}
};
export { e as NotificationManager };
//# sourceMappingURL=jb-notification-manager.js.map