"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[694],{7344(e,t,r){r.d(t,{A:()=>n});const n=new(r(94560).WebSocketClient)},83040(e,t,r){r.d(t,{A:()=>s});var n=r(36418),a=r(14778);const l=r(67166).default.div.withConfig({displayName:"WrapperDiv"})(["align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%;#root > &{grid-area:announcement;display:flex;word-break:normal;flex-direction:row;gap:10px;height:40px;}"]);class s extends n.PureComponent{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}clearErrorState=e=>{e.preventDefault(),e.stopPropagation(),this.setState({hasError:!1})};render(){return this.state.hasError?n.createElement(l,null,n.createElement(a.FormattedMessage,{id:"pluggable.errorOccurred",defaultMessage:"An error occurred in the {pluginId} plugin.",values:{pluginId:this.props.pluginId}}),n.createElement("br",null),n.createElement("a",{href:"#",onClick:this.clearErrorState},n.createElement(a.FormattedMessage,{id:"pluggable.errorRefresh",defaultMessage:"Refresh?"}))):this.props.children}}},694(e,t,r){r.r(t),r.d(t,{default:()=>i}),r(43617),r(81975),r(93991);var n=r(36418),a=r(37270),l=r(77440),s=r(7344),o=r(83040);const i=function(e){const{pluggableId:t,pluggableName:r,subComponentName:i="",...c}=e,u=(0,a.useSelector)(l.O4),p=(0,a.useSelector)(e=>{const t=e.plugins.components;if(Object.hasOwn(t,r))return t[r]});if(!r||!p)return null;let d,m=[...p];return t&&(m=m.filter(e=>e.id===t)),d="Product"===r?m.map(e=>{if(!i||!e[i])return null;const t=e[i];return n.createElement(o.A,{key:r+e.id,pluginId:e.pluginId},n.createElement(t,Object.assign({},c,{theme:u})))}):m.map(e=>{if(!("component"in e)||!e.component)return null;const t=e.component;return n.createElement(o.A,{key:r+e.id,pluginId:e.pluginId},n.createElement(t,Object.assign({},c,{theme:u,webSocketClient:s.A})))}),n.createElement(n.Fragment,null,d)}}}]);
//# sourceMappingURL=694.57967edb18da6fb8b636.js.map