package com.discord.views; import android.widget.TextView; import c.a.i.o0; import com.discord.api.auth.OAuthScope; import com.discord.utilities.views.SimpleRecyclerAdapter; import d0.z.d.m; import kotlin.NoWhenBranchMatchedException; /* compiled from: OAuthPermissionViews.kt */ public final class OAuthPermissionViews { /* compiled from: OAuthPermissionViews.kt */ public static final class InvalidScopeException extends IllegalArgumentException { private final String scope; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public InvalidScopeException(String str) { super("invalid scope: " + str); m.checkNotNullParameter(str, "scope"); this.scope = str; } public final String a() { return this.scope; } } /* compiled from: OAuthPermissionViews.kt */ public static final class a extends SimpleRecyclerAdapter.ViewHolder { public final o0 a; /* JADX WARNING: Illegal instructions before constructor call */ public a(o0 o0Var) { super(r0); m.checkNotNullParameter(o0Var, "binding"); TextView textView = o0Var.a; m.checkNotNullExpressionValue(textView, "binding.root"); this.a = o0Var; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // com.discord.utilities.views.SimpleRecyclerAdapter.ViewHolder public void bind(OAuthScope oAuthScope) { OAuthScope oAuthScope2 = oAuthScope; m.checkNotNullParameter(oAuthScope2, "data"); TextView textView = this.a.a; m.checkNotNullExpressionValue(textView, "binding.root"); OAuthPermissionViews.a(textView, oAuthScope2); } } public static final void a(TextView textView, OAuthScope oAuthScope) throws InvalidScopeException { int i; m.checkNotNullParameter(textView, "$this$setScopePermissionText"); m.checkNotNullParameter(oAuthScope, "scope"); if (m.areEqual(oAuthScope, OAuthScope.Identify.INSTANCE)) { i = 2131893256; } else if (m.areEqual(oAuthScope, OAuthScope.Email.INSTANCE)) { i = 2131893248; } else if (m.areEqual(oAuthScope, OAuthScope.Connections.INSTANCE)) { i = 2131893246; } else if (m.areEqual(oAuthScope, OAuthScope.Guilds.INSTANCE)) { i = 2131893252; } else if (m.areEqual(oAuthScope, OAuthScope.GuildsJoin.INSTANCE)) { i = 2131893254; } else if (m.areEqual(oAuthScope, OAuthScope.GdmJoin.INSTANCE)) { i = 2131893250; } else if (m.areEqual(oAuthScope, OAuthScope.Bot.INSTANCE)) { i = 2131893243; } else if (m.areEqual(oAuthScope, OAuthScope.WebhookIncoming.INSTANCE)) { i = 2131893270; } else if (m.areEqual(oAuthScope, OAuthScope.Rpc.INSTANCE)) { i = 2131893261; } else if (m.areEqual(oAuthScope, OAuthScope.RpcNotificationsRead.INSTANCE)) { i = 2131893264; } else if (m.areEqual(oAuthScope, OAuthScope.RpcVoiceRead.INSTANCE)) { i = 2131893266; } else if (m.areEqual(oAuthScope, OAuthScope.RpcVoiceWrite.INSTANCE)) { i = 2131893267; } else if (m.areEqual(oAuthScope, OAuthScope.RpcActivitiesWrite.INSTANCE)) { i = 2131893262; } else if (m.areEqual(oAuthScope, OAuthScope.MessagesRead.INSTANCE)) { i = 2131893257; } else if (m.areEqual(oAuthScope, OAuthScope.ApplicationsBuildsUpload.INSTANCE)) { i = 2131893233; } else if (m.areEqual(oAuthScope, OAuthScope.ApplicationsBuildsRead.INSTANCE)) { i = 2131893231; } else if (m.areEqual(oAuthScope, OAuthScope.ApplicationsCommands.INSTANCE)) { i = 2131893235; } else if (m.areEqual(oAuthScope, OAuthScope.ApplicationsCommandsUpdate.INSTANCE)) { i = 2131893237; } else if (m.areEqual(oAuthScope, OAuthScope.ApplicationsStoreUpdate.INSTANCE)) { i = 2131893241; } else if (m.areEqual(oAuthScope, OAuthScope.ApplicationsEntitlements.INSTANCE)) { i = 2131893239; } else if (m.areEqual(oAuthScope, OAuthScope.ActivitiesRead.INSTANCE)) { i = 2131893227; } else if (m.areEqual(oAuthScope, OAuthScope.ActivitiesWrite.INSTANCE)) { i = 2131893229; } else if (m.areEqual(oAuthScope, OAuthScope.RelationshipsRead.INSTANCE)) { i = 2131893259; } else if (oAuthScope instanceof OAuthScope.Invalid) { throw new InvalidScopeException(((OAuthScope.Invalid) oAuthScope).b()); } else { throw new NoWhenBranchMatchedException(); } textView.setText(i); } }