discord-jadx/app/src/main/java/com/discord/utilities/billing/GooglePlaySkuKt.java

54 lines
2.3 KiB
Java

package com.discord.utilities.billing;
import com.discord.utilities.billing.GooglePlaySku;
import d0.z.d.m;
import kotlin.NoWhenBranchMatchedException;
/* compiled from: GooglePlaySku.kt */
public final class GooglePlaySkuKt {
public final /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
GooglePlaySku.Type.values();
int[] iArr = new int[5];
$EnumSwitchMapping$0 = iArr;
iArr[GooglePlaySku.Type.PREMIUM_TIER_2.ordinal()] = 1;
iArr[GooglePlaySku.Type.PREMIUM_TIER_1.ordinal()] = 2;
iArr[GooglePlaySku.Type.PREMIUM_TIER_2_AND_PREMIUM_GUILD.ordinal()] = 3;
iArr[GooglePlaySku.Type.PREMIUM_TIER_1_AND_PREMIUM_GUILD.ordinal()] = 4;
iArr[GooglePlaySku.Type.PREMIUM_GUILD.ordinal()] = 5;
}
}
public static final GooglePlaySku.Section getSection(GooglePlaySku googlePlaySku) {
m.checkNotNullParameter(googlePlaySku, "$this$getSection");
int ordinal = googlePlaySku.getType().ordinal();
if (ordinal == 0 || ordinal == 1) {
return GooglePlaySku.Section.PREMIUM;
}
if (ordinal == 2 || ordinal == 3) {
return GooglePlaySku.Section.PREMIUM_AND_PREMIUM_GUILD;
}
if (ordinal == 4) {
return GooglePlaySku.Section.PREMIUM_GUILD;
}
throw new NoWhenBranchMatchedException();
}
public static final boolean isBundledSku(GooglePlaySku googlePlaySku) {
m.checkNotNullParameter(googlePlaySku, "$this$isBundledSku");
return googlePlaySku.getType() == GooglePlaySku.Type.PREMIUM_TIER_2_AND_PREMIUM_GUILD || googlePlaySku.getType() == GooglePlaySku.Type.PREMIUM_TIER_1_AND_PREMIUM_GUILD;
}
public static final boolean isTier1(GooglePlaySku googlePlaySku) {
m.checkNotNullParameter(googlePlaySku, "$this$isTier1");
return googlePlaySku.getType() == GooglePlaySku.Type.PREMIUM_TIER_1 || googlePlaySku.getType() == GooglePlaySku.Type.PREMIUM_TIER_1_AND_PREMIUM_GUILD;
}
public static final boolean isTier2(GooglePlaySku googlePlaySku) {
m.checkNotNullParameter(googlePlaySku, "$this$isTier2");
return googlePlaySku.getType() == GooglePlaySku.Type.PREMIUM_TIER_2 || googlePlaySku.getType() == GooglePlaySku.Type.PREMIUM_TIER_2_AND_PREMIUM_GUILD;
}
}