"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[2974],{92974:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var E=n(37270),r=n(78451),a=n(36418);const i={emitBrowserWindowResized:function(e){let t=e;if(!e){const e=window.innerWidth;switch(!0){case e>r.YM.TABLET_SCREEN_WIDTH&&e<=r.YM.DESKTOP_SCREEN_WIDTH:t=r.$x.SMALL_DESKTOP_VIEW;break;case e>r.YM.MOBILE_SCREEN_WIDTH&&e<=r.YM.TABLET_SCREEN_WIDTH:t=r.$x.TABLET_VIEW;break;case e<=r.YM.MOBILE_SCREEN_WIDTH:t=r.$x.MOBILE_VIEW;break;default:t=r.$x.DESKTOP_VIEW}}return{type:r.Q3.BROWSER_WINDOW_RESIZED,data:t}}},c=(0,E.connect)(null,i)((function(e){const t=(0,a.useRef)(window.matchMedia(`(min-width: ${r.Ay.DESKTOP_SCREEN_WIDTH+1}px)`)),n=(0,a.useRef)(window.matchMedia(`(min-width: ${r.Ay.TABLET_SCREEN_WIDTH+1}px) and (max-width: ${r.Ay.DESKTOP_SCREEN_WIDTH}px)`)),E=(0,a.useRef)(window.matchMedia(`(min-width: ${r.Ay.MOBILE_SCREEN_WIDTH+1}px) and (max-width: ${r.Ay.TABLET_SCREEN_WIDTH}px)`)),i=(0,a.useRef)(window.matchMedia(`(max-width: ${r.Ay.MOBILE_SCREEN_WIDTH}px)`)),c=(0,a.useCallback)((()=>{t.current.matches?e.emitBrowserWindowResized(r.$x.DESKTOP_VIEW):n.current.matches?e.emitBrowserWindowResized(r.$x.SMALL_DESKTOP_VIEW):E.current.matches?e.emitBrowserWindowResized(r.$x.TABLET_VIEW):i.current.matches&&e.emitBrowserWindowResized(r.$x.MOBILE_VIEW)}),[]);return(0,a.useLayoutEffect)((()=>{c()}),[c]),(0,a.useEffect)((()=>{const e=e=>{e.matches&&c()};return t.current.addEventListener("change",e),n.current.addEventListener("change",e),E.current.addEventListener("change",e),i.current.addEventListener("change",e),()=>{t.current.removeEventListener("change",e),n.current.removeEventListener("change",e),E.current.removeEventListener("change",e),i.current.removeEventListener("change",e)}}),[c]),null}))}}]);
//# sourceMappingURL=2974.b389e2fb04f016c992f4.js.map