"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7594],{67594(e,t,n){n.r(t),n.d(t,{default:()=>h});var s=n(32858),a=n.n(s),r=n(36418),i=n(37270),d=n(62844),c=n(2386),L=n(71769),E=n(81444);const h=function(){const e=(0,i.useDispatch)(),t=(0,r.useRef)(window.matchMedia(`(max-width: ${E.Ay.SMALL_SIDEBAR_BREAKPOINT}px)`)).current,n=(0,r.useRef)(window.matchMedia(`(min-width: ${E.Ay.SMALL_SIDEBAR_BREAKPOINT+1}px) and (max-width: ${E.Ay.MEDIUM_SIDEBAR_BREAKPOINT}px)`)).current,s=(0,r.useRef)(window.matchMedia(`(min-width: ${E.Ay.MEDIUM_SIDEBAR_BREAKPOINT+1}px) and (max-width: ${E.Ay.LARGE_SIDEBAR_BREAKPOINT}px)`)).current,h=(0,r.useRef)(window.matchMedia(`(min-width: ${E.Ay.LARGE_SIDEBAR_BREAKPOINT+1}px)`)).current,m=(0,r.useCallback)(()=>{switch(!0){case h.matches:e((0,d.$B)(L.sK.XLARGE)),e((0,c.hf)(L.sK.XLARGE));break;case s.matches:e((0,d.$B)(L.sK.LARGE)),e((0,c.hf)(L.sK.LARGE));break;case n.matches:e((0,d.$B)(L.sK.MEDIUM)),e((0,c.hf)(L.sK.MEDIUM));break;case t.matches:e((0,d.$B)(L.sK.SMALL)),e((0,c.hf)(L.sK.SMALL))}},[e]),A=(0,r.useMemo)(()=>a()(()=>{e((0,d.$B)()),e((0,c.hf)())},100),[e]),v=(0,r.useCallback)(e=>{e.matches&&m()},[m]);return(0,r.useEffect)(()=>(m(),t.addEventListener?(h.addEventListener("change",v),s.addEventListener("change",v),n.addEventListener("change",v),t.addEventListener("change",v)):t.addListener?(h.addListener(v),s.addListener(v),n.addListener(v),t.addListener(v)):window.addEventListener("resize",A),()=>{t.removeEventListener?(h.removeEventListener("change",v),s.removeEventListener("change",v),n.removeEventListener("change",v),t.removeEventListener("change",v)):t.removeListener?(h.removeListener(v),s.removeListener(v),n.removeListener(v),t.removeListener(v)):window.removeEventListener("resize",A)}),[v,A,m]),null}}}]);
//# sourceMappingURL=7594.d2110d059230b36a29be.js.map