"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7422],{87422:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m}),a(43813);var n=a(97023),o=a(23453),c=a(81911),s=a(23877),l=a(40693),u=a(65952),r=a(14776),i=a(78546),d=a(25778),p=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,r.Uj)(e,a))),_=(0,o.useSelector)((e=>(0,p.y1)(e,a))),b=(0,o.useSelector)((e=>(0,u.UT)(e,(null==y?void 0:y.id)||"",_)));return(0,n.useEffect)((()=>{(async()=>{const e=null!=b?b:await l.mT.getChannelByName((null==y?void 0:y.id)||"","town-square");t((0,d.BX)(e)),t(function(e,t,a){return async n=>{const o=(0,i.$C)();n({type:"playbooks_set_client_id",clientId:o});const c="/playbook run-playbook ".concat(a," ").concat(o),u={channel_id:e.id,team_id:t};try{const e=await l.mT.executeCommand(c,u);n({type:s.s2.RECEIVED_DIALOG_TRIGGER_ID,data:null==e?void 0:e.trigger_id})}catch(e){console.error(e)}}}(e,(null==y?void 0:y.id)||"",m))})()}),[]),null}}}]);
//# sourceMappingURL=7422.d2029b6d506f60433c46.js.map