import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { s as store, A as AuthSubscribe, b as AuthUnsubscribe } from './auth.js';
const notificationBellCss = ".uxn-notification-bell{min-width:var(--uxn-notification-bell-min-width);min-height:var(--uxn-notification-bell-min-height);background:var(--uxn-notification-bell-background);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;position:relative}.ux-iws-navigation-meta__item .uxn-notification-bell{margin-right:5px}.uxn-notification-bell .uxn-notification-bell__content{position:relative}.uxn-notification-bell:hover{background:var(--uxn-notification-bell-background-hover)}.uxn-notification-bell--limit .ux-badge::after{content:\"+\"}div[slot=notifications-bell] .uxn-notification-bell .ux-notification-bell{background:none}";
const NotificationBell = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.baseClass = store.get("counter") > 99
? "uxn-notification-bell uxn-notification-bell--limit"
: "uxn-notification-bell";
}
componentDidLoad() {
AuthSubscribe();
}
disconnectedCallback() {
AuthUnsubscribe();
}
render() {
return (h(Host, { class: this.baseClass }, h("div", { class: "uxn-notification-bell__content" }, store.get("token") !== null && store.get("counter") > 0 ? (h("ux-notification-bell", { counter: store.get("counter") > 99
? "99"
: store.get("counter") })) : (h("ux-notification-bell", null)))));
}
static get style() { return notificationBellCss; }
}, [0, "uxn-notification-bell"]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["uxn-notification-bell"];
components.forEach(tagName => { switch (tagName) {
case "uxn-notification-bell":
if (!customElements.get(tagName)) {
customElements.define(tagName, NotificationBell);
}
break;
} });
}
const UxnNotificationBell = NotificationBell;
const defineCustomElement = defineCustomElement$1;
export { UxnNotificationBell, defineCustomElement };