1"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[1892],{31892(e,t,n){n.r(t),n.d(t,{default:()=>E}),n(43617),n(81975);var a=n(37270),o=n(32446),l=n(23739),r=n(65952),s=n(14776),i=n(7430),u=n(91767),m=n(81444),c=n(36418),h=n(89735),_=n(14778),d=n(14891),p=n(79342),v=n(19513);class f extends c.PureComponent{constructor(e){super(e),this.state={show:!0}}componentDidMount(){document.addEventListener("keypress",this.handleKeyPress)}componentWillUnmount(){document.removeEventListener("keypress",this.handleKeyPress)}handleHide=()=>{this.setState({show:!1})};handleKeyPress=e=>{(0,v.e)(e,m.Ay.KeyCodes.ENTER)&&this.handleSubmit()};handleSubmit=()=>{this.handleHide(),this.props.actions.leaveTeam(this.props.currentTeamId,this.props.currentUserId),this.props.actions.toggleSideBarRightMenu()};render(){const{currentUser:e,numOfPrivateChannels:t,numOfPublicChannels:n}=this.props;let a;return a=p.P(e.roles)?0!==n&&0!==t?c.createElement(_.FormattedMessage,{id:"leave_team_modal_guest.description",defaultMessage:"<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?",values:{num_of_public_channels:n,num_of_private_channels:t,strong:e=>c.createElement("strong",null,e)}}):0===n?c.createElement(_.FormattedMessage,{id:"leave_team_modal_guest_only_private.description",defaultMessage:"<strong>You will be removed from {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?",values:{num_of_private_channels:t,strong:e=>c.createElement("strong",null,e)}}):c.createElement(_.FormattedMessage,{id:"leave_team_modal_guest_only_public.description",defaultMessage:"<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?",values:{num_of_public_channels:n,strong:e=>c.createElement("strong",null,e)}}):0!==n&&0!==t?c.createElement(_.FormattedMessage,{id:"leave_team_modal.description",defaultMessage:"<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?",values:{num_of_public_channels:n,num_of_private_channels:t,strong:e=>c.createElement("strong",null,e)}}):0===n?c.createElement(_.FormattedMessage,{id:"leave_team_modal_private.description",defaultMessage:"<strong>You will be removed from {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?",values:{num_of_private_channels:t,strong:e=>c.createElement("strong",null,e)}}):c.createElement(_.FormattedMessage,{id:"leave_team_modal_public.description",defaultMessage:"<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} on this team.</strong> Are you sure?",values:{num_of_public_channels:n,strong:e=>c.createElement("strong",null,e)}}),c.createElement(h.Modal,{dialogClassName:"a11y__modal",className:"modal-confirm",show:this.state.show,onExited:this.props.onExited,onHide:this.handleHide,id:"leaveTeamModal",role:"none","aria-labelledby":"leaveTeamModalLabel"},c.createElement(h.Modal.Header,{closeButton:!1},c.createElement(h.Modal.Title,{componentClass:"h1",id:"leaveTeamModalLabel"},c.createElement(_.FormattedMessage,{id:"leave_team_modal.title",defaultMessage:"Leave the team?"}))),c.createElement(h.Modal.Body,null,a),c.createElement(h.Modal.Footer,null,c.createElement(d.Button,{type:"button",emphasis:"tertiary",onClick:this.handleHide,id:"leaveTeamNo"},c.createElement(_.FormattedMessage,{id:"leave_team_modal.no",defaultMessage:"No"})),c.createElement(d.Button,{type:"button",variant:"destructive",onClick:this.handleSubmit,id:"leaveTeamYes"},c.createElement(_.FormattedMessage,{id:"leave_team_modal.yes",defaultMessage:"Yes"}))))}}function b(e){return(0,r.$3)(e).filter(e=>e.type===m.YM.PRIVATE_CHANNEL).length}function g(e){return(0,r.$3)(e).filter(e=>e.type===m.YM.OPEN_CHANNEL).length}const E=(0,a.connect)(function(e){return{currentUserId:(0,i.WR)(e),currentTeamId:(0,s.Sy)(e),currentUser:(0,i.HW)(e),numOfPrivateChannels:b(e),numOfPublicChannels:g(e)}},function(e){return{actions:(0,o.zH)({leaveTeam:l.fy,toggleSideBarRightMenu:u.u9},e)}})(f)}}]); 2//# sourceMappingURL=1892.91b80c9dc623b9d6e517.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.