import{t as e}from"./vue.runtime.esm-BkFIT5TI.js";import{a as t,l as n,n as r,r as i,s as a,t as o}from"./_plugin-vue2_normalizer-agX0mVFg.js";import{St as s,U as c,at as l,dt as u,ht as d,it as f,nt as p,pt as m,t as h,ut as g}from"./lib-DPUqMlxa.js";import{t as _}from"./AppBtn-Cax1vPEQ.js";import{S as v,w as y}from"./index-CcijY9_7.js";h();var b=class extends e{fullscreen;consoleElement;autoScrollPaused=!1;get filters(){return this.$typedState.console.consoleFilters}get hideTempWaits(){return this.$typedState.config.uiSettings.general.hideTempWaits}set hideTempWaits(e){this.$typedDispatch(`config/saveByPath`,{path:`uiSettings.general.hideTempWaits`,value:e,server:!0})}get flipLayout(){return this.$typedState.config.uiSettings.general.flipConsoleLayout}set flipLayout(e){this.$typedDispatch(`config/saveByPath`,{path:`uiSettings.general.flipConsoleLayout`,value:e,server:!0})}get items(){return this.$typedGetters[`console/getConsoleEntries`]}get inLayout(){return this.$typedState.config.layoutMode}inLayoutChange(e){e||this.consoleElement.scrollToLatest()}handleCollapseChange(e){e||this.consoleElement.scrollToLatest()}handleClear(){this.$typedDispatch(`console/onClear`)}handleToggleFilter(e){this.$typedDispatch(`console/onSaveFilter`,{...e,enabled:!e.enabled})}};r([a({type:Boolean})],b.prototype,`fullscreen`,void 0),r([t(`console`)],b.prototype,`consoleElement`,void 0),r([i(`inLayout`)],b.prototype,`inLayoutChange`,null),b=r([n({components:{Console:y}})],b);var x=o(b,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(v,{attrs:{title:e.$t(`app.general.title.console`),icon:`$console`,"help-tooltip":e.$t(`app.console.tooltip.help`),"card-classes":`d-flex flex-column`,"content-classes":`flex-grow-1 flow-shrink-0`,"menu-breakpoint":`none`,"menu-icon":`$cog`,draggable:!e.fullscreen,collapsable:!e.fullscreen,"layout-path":`dashboard.console-card`},on:{collapsed:e.handleCollapseChange},scopedSlots:e._u([{key:`menu`,fn:function(){return[e.autoScrollPaused?t(_,{attrs:{icon:``},on:{click:function(t){return e.consoleElement.scrollToLatest()}}},[t(s,{attrs:{dense:``}},[e._v(` `+e._s(e.flipLayout?`$up`:`$down`)+` `)])],1):e._e(),e.fullscreen?e._e():t(_,{attrs:{icon:``},on:{click:function(t){return e.$filters.routeTo({name:`console`})}}},[t(s,{attrs:{dense:``}},[e._v(` $fullScreen `)])],1),t(_,{attrs:{icon:``},on:{click:e.handleClear}},[t(s,{attrs:{dense:``}},[e._v(` $delete `)])],1),t(d,{attrs:{bottom:``,left:``,"offset-y":``,transition:`slide-y-transition`,"close-on-content-click":!1},scopedSlots:e._u([{key:`activator`,fn:function({on:n,attrs:r}){return[t(_,e._g(e._b({attrs:{icon:``}},`app-btn`,r,!1),n),[t(s,{attrs:{dense:``}},[e._v(` $cog `)])],1)]}}])},[t(u,{attrs:{dense:``}},[t(g,{on:{click:function(t){e.hideTempWaits=!e.hideTempWaits}}},[t(l,{staticClass:`my-0`},[t(c,{attrs:{"input-value":e.hideTempWaits}})],1),t(p,[t(f,[e._v(` `+e._s(e.$t(`app.console.label.hide_temp_waits`))+` `)])],1)],1),t(g,{on:{click:function(t){e.flipLayout=!e.flipLayout}}},[t(l,{staticClass:`my-0`},[t(c,{attrs:{"input-value":e.flipLayout}})],1),t(p,[t(f,[e._v(` `+e._s(e.$t(`app.console.label.flip_layout`))+` `)])],1)],1),e.filters&&e.filters.length?[t(m),e._l(e.filters,function(n){return t(g,{key:n.id,on:{click:function(t){return e.handleToggleFilter(n)}}},[t(l,{staticClass:`my-0`},[t(c,{attrs:{"input-value":n.enabled}})],1),t(p,[t(f,[e._v(` `+e._s(n.name)+` `)])],1)],1)})]:e._e()],2)],1)]},proxy:!0}])},[t(`console`,{ref:`console`,attrs:{items:e.items,fullscreen:e.fullscreen},on:{"update:auto-scroll-paused":function(t){e.autoScrollPaused=t}}})],1)},[],!1,null,null,null,null).exports;export{x as t};