76 lines
2.3 KiB
Java
76 lines
2.3 KiB
Java
package com.discord.utilities.gifting;
|
|
|
|
import androidx.annotation.DrawableRes;
|
|
import androidx.annotation.RawRes;
|
|
import com.discord.R;
|
|
import com.discord.models.domain.ModelGift;
|
|
import d0.g;
|
|
import d0.z.d.m;
|
|
import kotlin.Lazy;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: GiftStyle.kt */
|
|
public enum GiftStyle {
|
|
WumpusGlobe(1, R.drawable.gift_wumpus_snowglobe, R.raw.anim_gift_wumpus_globe),
|
|
WumpusBox(2, R.drawable.gift_wumpus_box, R.raw.anim_gift_wumpus_box),
|
|
WumpusLatte(3, R.drawable.gift_wumpus_latte, R.raw.anim_gift_wumpus_latte);
|
|
|
|
public static final Companion Companion = new Companion(null);
|
|
private static final Lazy values$delegate = g.lazy(GiftStyle$Companion$values$2.INSTANCE);
|
|
private final int animRes;
|
|
|
|
/* renamed from: id reason: collision with root package name */
|
|
private final int f2228id;
|
|
private final int staticRes;
|
|
|
|
/* compiled from: GiftStyle.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private final GiftStyle[] getValues() {
|
|
Lazy access$getValues$cp = GiftStyle.access$getValues$cp();
|
|
Companion companion = GiftStyle.Companion;
|
|
return (GiftStyle[]) access$getValues$cp.getValue();
|
|
}
|
|
|
|
public final GiftStyle from(ModelGift modelGift) {
|
|
m.checkNotNullParameter(modelGift, "gift");
|
|
GiftStyle[] values = getValues();
|
|
for (GiftStyle giftStyle : values) {
|
|
int id2 = giftStyle.getId();
|
|
Integer giftStyle2 = modelGift.getGiftStyle();
|
|
if (giftStyle2 != null && id2 == giftStyle2.intValue()) {
|
|
return giftStyle;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
private GiftStyle(int i, @DrawableRes int i2, @RawRes int i3) {
|
|
this.f2228id = i;
|
|
this.staticRes = i2;
|
|
this.animRes = i3;
|
|
}
|
|
|
|
public static final /* synthetic */ Lazy access$getValues$cp() {
|
|
return values$delegate;
|
|
}
|
|
|
|
public final int getAnimRes() {
|
|
return this.animRes;
|
|
}
|
|
|
|
public final int getId() {
|
|
return this.f2228id;
|
|
}
|
|
|
|
public final int getStaticRes() {
|
|
return this.staticRes;
|
|
}
|
|
}
|