(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{components:()=>B});const n=flarum.core.compat["forum/app"];var e=o.n(n);const a=flarum.core.compat["common/extend"],r=flarum.core.compat["common/Application"];var s=o.n(r);function i(o,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},i(o,t)}function c(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,i(o,t)}const l=flarum.core.compat["common/Component"];var u=o.n(l);const p=flarum.core.compat["common/helpers/listItems"];var f=o.n(p);const d=flarum.core.compat["common/utils/ItemList"];var b=o.n(d);const v=flarum.core.compat["common/components/LinkButton"];var y=o.n(v);const h=flarum.core.compat["common/components/Button"];var g=o.n(h);const w=flarum.core.compat["forum/components/LogInModal"];var O=o.n(w),_=function(o){function t(){return o.apply(this,arguments)||this}return c(t,o),t.prototype.view=function(o){var t=this.attrs,n=t.route,e=t.icon,a=t.label;return m(y(),{href:n,icon:e,title:a},a)},t}(u());const M=flarum.core.compat["forum/components/SessionDropdown"];var N=o.n(M);const j=flarum.core.compat["common/helpers/avatar"];var x=o.n(j),S=function(o){function t(){return o.apply(this,arguments)||this}return c(t,o),t.prototype.getButtonContent=function(){var o=e().session.user;return[x()(o)," ",m("span",{className:"Button-label"},e().translator.trans("acpl-mobile-tab.forum.profile"))]},t}(N()),T=function(o){function t(){return o.apply(this,arguments)||this}c(t,o);var n=t.prototype;return n.view=function(o){return m("nav",{className:"MobileTab"},m("ul",{className:"MobileTab-items"},f()(this.items().toArray())))},n.items=function(){var o=new(b());if(o.add("home",m(_,{route:"/",icon:"fas fa-home",label:e().translator.trans("acpl-mobile-tab.forum.home")}),100),"/all"===e().routes.index.path?o.add("all",m(_,{route:e().route("index"),icon:"fas fa-comments",label:e().translator.trans("acpl-mobile-tab.forum.all_discussions")}),90):"askvortsov-categories"in flarum.extensions?o.add("categories",m(_,{route:e().route("categories"),icon:"fas fa-th-list",label:e().translator.trans("acpl-mobile-tab.forum.categories")}),90):"flarum-tags"in flarum.extensions&&o.add("tags",m(_,{route:e().route("tags"),icon:"fas fa-tags",label:e().translator.trans("acpl-mobile-tab.forum.tags")}),90),e().session.user){var t=e().session.user.unreadNotificationCount();o.add("notifications",m(y(),{href:e().route("notifications"),icon:"fas fa-bell",title:e().translator.trans("acpl-mobile-tab.forum.notifications"),className:"Dropdown NotificationsDropdown"},t?m("span",{className:"NotificationsDropdown-unread"},t):"",e().translator.trans("acpl-mobile-tab.forum.notifications")),80),o.add("session",m(S,null),70)}else o.add("logIn",m(g(),{icon:"fas fa-user",className:"Button Button--link",onclick:function(){return e().modal.show(O(),{})}},e().translator.trans("acpl-mobile-tab.forum.log_in")),70);return o},t}(u()),B={MobileTab:T,MobileTabItem:_,MobileTabSessionDropdown:S};e().initializers.add("acpl/mobile-tab",(function(){(0,a.extend)(s().prototype,"mount",(function(){var o=document.createElement("div");m.mount(document.body.appendChild(o),T)}))}))})(),module.exports=t})();
//# sourceMappingURL=forum.js.map