"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7994],{97994:(e,t,a)=>{a.r(t),a.d(t,{default:()=>N});var r=a(97023),i=a.n(r),n=a(14778),o=(a(4290),a(23453)),s=a(5908),l=a(14776),d=a(7430),c=a(79751),m=a(62688),p=a.n(m),u=(a(17046),a(92387)),f=a.n(u),h=a(67277),v=a(11053),y=a(87131),b=a(78451);function g(e,t,a){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const _=f().div.withConfig({displayName:"HeaderLine"})(["display:flex;padding:2px 16px 0 0;flex-grow:1;user-select:none;color:var(--sidebar-header-text-color);"]),w=f().div.withConfig({displayName:"VerticalStack"})(["display:flex;flex-direction:column;flex-grow:1;"]);class E extends i().PureComponent{constructor(){super(...arguments),g(this,"handleCustomStatusEmojiClick",(e=>{e.stopPropagation();const t={modalId:b.IQ.CUSTOM_STATUS,dialogType:v.A};this.props.actions.openModal(t)}))}render(){if(!this.props.currentUser||!this.props.teamId)return null;let e=i().createElement("h1",{id:"headerTeamName",className:"team__name","data-teamid":this.props.teamId},this.props.teamDisplayName);return this.props.teamDescription&&(e=i().createElement(y.A,{title:this.props.teamDescription},e)),i().createElement("div",{className:"SidebarHeaderDropdownButton",id:"sidebarHeaderDropdownButton"},i().createElement(_,{id:"headerInfo",className:"header__info"},i().createElement(w,null,e,i().createElement("div",{id:"headerInfoContent",className:"header__info__content"},i().createElement("div",{id:"headerUsername",className:"user__name"},"@"+this.props.currentUser.username),i().createElement(h.A,{showTooltip:!0,emojiStyle:{verticalAlign:"top",marginLeft:2},onClick:this.handleCustomStatusEmojiClick})))))}}g(E,"propTypes",{teamDescription:p().string,teamId:p().string,teamDisplayName:p().string,actions:p().shape({openModal:p().func.isRequired}).isRequired});const C=(0,o.connect)((function(e){const t=(0,l.H7)(e);return{currentUser:(0,d.HW)(e),teamDescription:null==t?void 0:t.description,teamDisplayName:null==t?void 0:t.display_name,teamId:null==t?void 0:t.id}}),(function(e){return{actions:(0,s.bindActionCreators)({openModal:c.q},e)}}))(E),N=function(){const e=(0,n.useIntl)().formatMessage({id:"accessibility.sections.lhsHeader",defaultMessage:"team menu region"});return i().createElement("div",{id:"lhsHeader","aria-label":e,tabIndex:-1,role:"application",className:"SidebarHeader team__header theme a11y__region","data-a11y-sort-order":"5"},i().createElement("div",{className:"d-flex"},i().createElement(C,null)))}}}]);
//# sourceMappingURL=7994.e1599bd997fab5769abd.js.map