"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[721],{21029(n,t,e){e.d(t,{A:()=>o});var s=e(71354),A=e.n(s),a=e(76314),i=e.n(a)()(A());i.push([n.id,".simple-layout {\n  height: 100%;\n  padding: 20px;\n  margin-left: auto;\n  margin-right: auto;\n  background-color: white;\n}\n\n.simple-layout > div {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n}\n\n.simple-layout .layout-content {\n  display: flex;\n  flex-direction: column;\n  overflow-y: auto;\n  flex: 1 1 100%;\n}\n\n.simple-layout .layout-content > div {\n  width: 100%;\n}\n\n.simple-layout .divider.top {\n  margin-bottom: 0px;\n}\n\n/* Message layout */\n.system-log .message-list {\n  width: 100%;\n  margin: 10px 0px !important;\n}\n\n.system-log .status.item i {\n  float: left;\n}\n\n.system-log .status.item .text {\n  margin-top: 5px;\n  margin-bottom: 10px;\n  overflow: hidden;\n}\n\n.system-log .status.item .time {\n  color: gray;\n}\n\n.system-log .status.item .label {\n  color: gray;\n  margin-right: 3px;\n}\n","",{version:3,sources:["webpack://./src/routes/Sidebar/routes/Events/style.css"],names:[],mappings:"AAAA;EACE,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,uBAAuB;AACzB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,YAAY;AACd;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;EAChB,cAAc;AAChB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;AACpB;;AAEA,mBAAmB;AACnB;EACE,WAAW;EACX,2BAA2B;AAC7B;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,eAAe;EACf,mBAAmB;EACnB,gBAAgB;AAClB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,WAAW;EACX,iBAAiB;AACnB",sourcesContent:[".simple-layout {\n  height: 100%;\n  padding: 20px;\n  margin-left: auto;\n  margin-right: auto;\n  background-color: white;\n}\n\n.simple-layout > div {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n}\n\n.simple-layout .layout-content {\n  display: flex;\n  flex-direction: column;\n  overflow-y: auto;\n  flex: 1 1 100%;\n}\n\n.simple-layout .layout-content > div {\n  width: 100%;\n}\n\n.simple-layout .divider.top {\n  margin-bottom: 0px;\n}\n\n/* Message layout */\n.system-log .message-list {\n  width: 100%;\n  margin: 10px 0px !important;\n}\n\n.system-log .status.item i {\n  float: left;\n}\n\n.system-log .status.item .text {\n  margin-top: 5px;\n  margin-bottom: 10px;\n  overflow: hidden;\n}\n\n.system-log .status.item .time {\n  color: gray;\n}\n\n.system-log .status.item .label {\n  color: gray;\n  margin-right: 3px;\n}\n"],sourceRoot:""}]);const o=i},8471(n,t,e){e.r(t),e.d(t,{default:()=>K});var s=e(74848),A=e(96540),a=e(22022),i=e(13686),o=e(86038),l=e(67749),r=e(4425);const m={clear:{id:"clear",displayName:"Clear",access:o.US.EVENTS_EDIT,icon:r.A.CLEAR,handler:({socket:n})=>n.delete(i.A.MESSAGES_URL)}},c={moduleData:{moduleId:l.KV.EVENTS},actions:m};var E=e(31224),u=e(99347),d=e(32728),g=e(91381),p=e(85072),y=e.n(p),C=e(97825),B=e.n(C),x=e(77659),h=e.n(x),f=e(55056),v=e.n(f),b=e(10540),w=e.n(b),S=e(41113),N=e.n(S),T=e(21029),W={};W.styleTagTransform=N(),W.setAttributes=v(),W.insert=h().bind(null,"head"),W.domAPI=B(),W.insertStyleElement=w(),y()(T.A,W),T.A&&T.A.locals&&T.A.locals;var k=e(42695),V=e(97145);const j=({messages:n,t})=>{const e=(0,V.c7)(n=>n.events.scroll);return n?0===n.length?(0,s.jsx)(d.A,{description:(0,k.Tl)("No messages to show",t,l.KV.EVENTS)}):(0,s.jsx)(g.A,{className:"events",messages:n,scrollPositionHandler:e,t}):(0,s.jsx)(u.A,{text:(0,k.Tl)("Loading messages",t,l.KV.EVENTS)})};var M=e(71352),I=e(6164),R=e(48249),_=e(39115);const K=(0,A.memo)(function(){const n=(0,V.tf)(),t=(0,V.c7)(n=>n.events.setViewActive),e=(0,R.F)(),i=(0,V.c7)(n=>n.activity.userActive);(0,A.useEffect)(()=>(t(!0),n.getState().events.isInitialized||I.W.fetchMessages(n.getState(),e),()=>t(!1)),[]),A.useEffect(()=>{i&&I.W.setRead(e)},[i]);const{t:o}=(0,a.Bd)(),m=(0,V.c7)(n=>n.events.logMessages);return(0,s.jsx)("div",{className:"simple-layout",children:(0,s.jsxs)("div",{className:"wrapper",children:[(0,s.jsx)(E.A,{icon:r.A.EVENTS_COLORED,title:(0,s.jsx)(M.Wy,{caption:(0,k.Tl)("Events",o,l.KV.EVENTS),actions:c,remoteMenuId:_.Ay.EVENTS})}),(0,s.jsx)("div",{className:"ui divider top"}),(0,s.jsx)("div",{className:"layout-content system-log",children:(0,s.jsx)(j,{messages:m,t:o})})]})})},()=>!0)}}]);
//# sourceMappingURL=system-log.a07b91b61f4b5e2c7795.chunk.js.map