"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7422],{87422:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var s=a(36418),o=a(37270),c=a(81911),n=a(23877),r=a(40693),u=a(65952),l=a(14776),i=a(78546),p=a(25778),d=a(35664);const m=()=>{const e=(0,c.useRouteMatch)(),t=(0,o.useDispatch)(),a=e.params.team,m=e.params.playbookId,y=(0,o.useSelector)((e=>(0,l.Uj)(e,a))),_=(0,o.useSelector)((e=>(0,d.y1)(e,a))),b=(0,o.useSelector)((e=>(0,u.UT)(e,y?.id||"",_)));return(0,s.useEffect)((()=>{(async()=>{const e=b??await r.mT.getChannelByName(y?.id||"","town-square");t((0,p.BX)(e)),t(function(e,t,a){return async s=>{const o=(0,i.$C)();s({type:"playbooks_set_client_id",clientId:o});const c=`/playbook run-playbook ${a} ${o}`,u={channel_id:e.id,team_id:t};try{const e=await r.mT.executeCommand(c,u);s({type:n.s2.RECEIVED_DIALOG_TRIGGER_ID,data:e?.trigger_id})}catch(e){console.error(e)}}}(e,y?.id||"",m))})()}),[]),null}}}]);
//# sourceMappingURL=7422.4e4b609b4a8d57645479.js.map