"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7704],{97704:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var a=n(70314),E=n(23712),r=n(84390);const c={emitBrowserWindowResized:function(e){let t=e;if(!e){const e=window.innerWidth;switch(!0){case e>E.Constants.TABLET_SCREEN_WIDTH&&e<=E.Constants.DESKTOP_SCREEN_WIDTH:t=E.Uj.SMALL_DESKTOP_VIEW;break;case e>E.Constants.MOBILE_SCREEN_WIDTH&&e<=E.Constants.TABLET_SCREEN_WIDTH:t=E.Uj.TABLET_VIEW;break;case e<=E.Constants.MOBILE_SCREEN_WIDTH:t=E.Uj.MOBILE_VIEW;break;default:t=E.Uj.DESKTOP_VIEW}}return{type:E.MF.BROWSER_WINDOW_RESIZED,data:t}}},s=(0,a.connect)(null,c)((function(e){const t=(0,r.useRef)(window.matchMedia("(min-width: ".concat(E.default.DESKTOP_SCREEN_WIDTH+1,"px)"))),n=(0,r.useRef)(window.matchMedia("(min-width: ".concat(E.default.TABLET_SCREEN_WIDTH+1,"px) and (max-width: ").concat(E.default.DESKTOP_SCREEN_WIDTH,"px)"))),a=(0,r.useRef)(window.matchMedia("(min-width: ".concat(E.default.MOBILE_SCREEN_WIDTH+1,"px) and (max-width: ").concat(E.default.TABLET_SCREEN_WIDTH,"px)"))),c=(0,r.useRef)(window.matchMedia("(max-width: ".concat(E.default.MOBILE_SCREEN_WIDTH,"px)"))),s=(0,r.useCallback)((()=>{t.current.matches?e.emitBrowserWindowResized(E.Uj.DESKTOP_VIEW):n.current.matches?e.emitBrowserWindowResized(E.Uj.SMALL_DESKTOP_VIEW):a.current.matches?e.emitBrowserWindowResized(E.Uj.TABLET_VIEW):c.current.matches&&e.emitBrowserWindowResized(E.Uj.MOBILE_VIEW)}),[]);return(0,r.useLayoutEffect)((()=>{s()}),[s]),(0,r.useEffect)((()=>{const e=e=>{e.matches&&s()};return t.current.addEventListener("change",e),n.current.addEventListener("change",e),a.current.addEventListener("change",e),c.current.addEventListener("change",e),()=>{t.current.removeEventListener("change",e),n.current.removeEventListener("change",e),a.current.removeEventListener("change",e),c.current.removeEventListener("change",e)}}),[s]),null}))}}]);
//# sourceMappingURL=7704.64c41c36a04541d252f6.js.map