Build 533169stable
Module 228965
874 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(311907),i=n(811024),s=n(782091),a=n(847381),o=n(849269),l=n(611010),u=n(576705),c=n(723702),d=n(818348),_=n(985018);function f(e){let t,{context:n,application:f,activityAction:p}=e,h="channel"===n.type?n.channel:void 0,m=(0,r.bG)([u.A],()=>u.A.can(d.xB.USE_EMBEDDED_ACTIVITIES,h)),E=(0,s.et)(h?.id),g=!1;switch(p){case o.o6.LEAVE:g=!1;break;case o.o6.START:null==h?g=!1:h?.isGuildVoice()?E!==s.xy.CAN_LAUNCH&&(g=!0):(0,i.pE)(h)||(g=!0);break;case o.o6.JOIN:h?.isGuildVoice()?g=!m:(0,i.pE)(h)||(g=!0)}if(p!==o.o6.LEAVE){let e=f instanceof l.Ay?f.embeddedActivityConfig:f.embedded_activity_config,n=(0,a.A)((0,c.getOS)());null==e||e.supported_platforms.includes(n)?h?.isThread()&&(g=!0,t=_.intl.string(_.t.ddSR3v)):(g=!1,t=_.intl.string(_.t.z2YTgJ))}return g&&null==t&&(t=_.intl.string(_.t.f41E1g)),{disabled:g,reason:t}}}