package defpackage; import android.content.Context; import android.view.View; import c.a.d.o; import c.a.z.r; import c.a.z.s; import com.discord.app.AppActivity; import com.discord.stores.StoreInviteSettings; import com.discord.stores.StoreStream; import com.discord.utilities.intent.IntentUtils; import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.views.OverlayMenuView; import java.util.Objects; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; /* compiled from: java-style lambda group */ /* renamed from: e reason: default package */ public final class e implements View.OnClickListener { public final /* synthetic */ int i; public final /* synthetic */ Object j; public final /* synthetic */ Object k; public e(int i, Object obj, Object obj2) { this.i = i; this.j = obj; this.k = obj2; } @Override // android.view.View.OnClickListener public final void onClick(View view) { int i = this.i; if (i == 0) { OverlayMenuView overlayMenuView = (OverlayMenuView) this.j; Long valueOf = Long.valueOf(((OverlayMenuView.a) this.k).f2114c.getChannel().g()); int i2 = OverlayMenuView.i; Objects.requireNonNull(overlayMenuView); if (valueOf != null) { ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(StoreInviteSettings.generateInvite$default(StoreStream.Companion.getInviteSettings(), valueOf.longValue(), null, 2, null), overlayMenuView, null, 2, null), OverlayMenuView.class, (Context) null, (Function1) null, new r(overlayMenuView), (Function0) null, (Function0) null, new s(overlayMenuView), 54, (Object) null); } else { o.g(overlayMenuView.getContext(), 2131890364, 0, null, 12); } } else if (i == 1) { OverlayMenuView overlayMenuView2 = (OverlayMenuView) this.j; Long valueOf2 = Long.valueOf(((OverlayMenuView.a) this.k).f2114c.getChannel().g()); int i3 = OverlayMenuView.i; Objects.requireNonNull(overlayMenuView2); overlayMenuView2.getContext().startActivity(IntentUtils.RouteBuilders.INSTANCE.connectVoice(valueOf2 != null ? valueOf2.longValue() : 0).setClass(overlayMenuView2.getContext(), AppActivity.Main.class).addFlags(268435456)); overlayMenuView2.l.mo1invoke(); } else { throw null; } } }