"use strict";(self.webpackChunkkeybase=self.webpackChunkkeybase||[]).push([[1956],{61956(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(22024),_constants_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(27129),_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(24953),react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(67926),_constants_teams__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(27002),_common_adapters__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(63044),_util_safe_navigation__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(88732),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(20390);const __WEBPACK_DEFAULT_EXPORT__=props=>{const $=(0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(29),members=props.members,teamID=props.teamID,conversationIDKey=props.conversationIDKey,[waiting,setWaiting]=react__WEBPACK_IMPORTED_MODULE_3__.useState(!1),[error,setError]=react__WEBPACK_IMPORTED_MODULE_3__.useState("");let t0;$[0]!==conversationIDKey||$[1]!==teamID?(t0=s=>_constants_teams__WEBPACK_IMPORTED_MODULE_4__.getTeamChannelInfo(s,teamID,conversationIDKey),$[0]=conversationIDKey,$[1]=teamID,$[2]=t0):t0=$[2];const channelInfo=(0,_constants_teams__WEBPACK_IMPORTED_MODULE_4__.useTeamsState)(t0),{channelname}=channelInfo,nav=(0,_util_safe_navigation__WEBPACK_IMPORTED_MODULE_6__.X)();let t1;$[3]!==nav?(t1=()=>nav.safeNavigateUp(),$[3]=nav,$[4]=t1):t1=$[4];const onCancel=t1,loadTeamChannelList=(0,_constants_teams__WEBPACK_IMPORTED_MODULE_4__.useTeamsState)(_temp),channelSetMemberSelected=(0,_constants_teams__WEBPACK_IMPORTED_MODULE_4__.useTeamsState)(_temp2),removeFromChannel=_constants__WEBPACK_IMPORTED_MODULE_2__.JN(_constants_types__WEBPACK_IMPORTED_MODULE_1__.uB.localRemoveFromConversationLocalRpcPromise);let t2;$[5]!==channelSetMemberSelected||$[6]!==conversationIDKey||$[7]!==loadTeamChannelList||$[8]!==members||$[9]!==nav||$[10]!==removeFromChannel||$[11]!==teamID?(t2=()=>{setWaiting(!0),setTimeout(()=>setWaiting(!1),1e3),removeFromChannel([{convID:_constants_types__WEBPACK_IMPORTED_MODULE_1__.ry.keyToConversationID(conversationIDKey),usernames:members}],_=>{setWaiting(!1),channelSetMemberSelected(conversationIDKey,"",!1,!0),nav.safeNavigateUp(),loadTeamChannelList(teamID)},err=>{setWaiting(!1),setError(err.message)})},$[5]=channelSetMemberSelected,$[6]=conversationIDKey,$[7]=loadTeamChannelList,$[8]=members,$[9]=nav,$[10]=removeFromChannel,$[11]=teamID,$[12]=t2):t2=$[12];const onRemove=t2;let t3;$[13]!==members?(t3=_constants_teams__WEBPACK_IMPORTED_MODULE_4__.stringifyPeople(members),$[13]=members,$[14]=t3):t3=$[14];const prompt=`Remove ${t3} from #${channelname}?`;let t4;$[15]!==members?(t4=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_5__.AvatarLine,{usernames:members,size:64,layout:"horizontal",maxShown:5}),$[15]=members,$[16]=t4):t4=$[16];const t5=members.length<=5?styles.iconContainerSingle:styles.iconContainer;let t6,t7;$[17]!==t5?(t6=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_5__.Icon,{boxStyle:t5,type:"iconfont-block",style:styles.headerIcon,sizeType:"Small"}),$[17]=t5,$[18]=t6):t6=$[18],$[19]!==t4||$[20]!==t6?(t7=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_common_adapters__WEBPACK_IMPORTED_MODULE_5__.Box,{style:styles.positionRelative,children:[t4,t6]}),$[19]=t4,$[20]=t6,$[21]=t7):t7=$[21];const header=t7;let t8;return $[22]!==error||$[23]!==header||$[24]!==onCancel||$[25]!==onRemove||$[26]!==prompt||$[27]!==waiting?(t8=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_5__.ConfirmModal,{header,prompt,onCancel,onConfirm:onRemove,confirmText:"Remove from channel",waiting,error}),$[22]=error,$[23]=header,$[24]=onCancel,$[25]=onRemove,$[26]=prompt,$[27]=waiting,$[28]=t8):t8=$[28],t8},styles=_common_adapters__WEBPACK_IMPORTED_MODULE_5__.Styles.styleSheetCreate(()=>({headerIcon:_common_adapters__WEBPACK_IMPORTED_MODULE_5__.Styles.platformStyles({common:{backgroundColor:_common_adapters__WEBPACK_IMPORTED_MODULE_5__.Styles.globalColors.red,borderColor:_common_adapters__WEBPACK_IMPORTED_MODULE_5__.Styles.globalColors.white,borderStyle:"solid",borderWidth:3,color:_common_adapters__WEBPACK_IMPORTED_MODULE_5__.Styles.globalColors.white,padding:3},isElectron:{backgroundClip:"padding-box",borderRadius:50},isMobile:{borderRadius:18,marginRight:-20,marginTop:-30}}),iconContainer:{bottom:-3,position:"absolute",right:20},iconContainerSingle:{bottom:-3,position:"absolute",right:0},positionRelative:{position:"relative"}}));function _temp(s_0){return s_0.dispatch.loadTeamChannelList}function _temp2(s_1){return s_1.dispatch.channelSetMemberSelected}}}]);
//# sourceMappingURL=1956.bundle.js.map