discord-jadx/app/src/main/java/com/discord/widgets/chat/input/CommandCategoryItem.java

140 lines
4.6 KiB
Java

package com.discord.widgets.chat.input;
import c.d.b.a.a;
import com.discord.models.commands.Application;
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
import d0.z.d.m;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: WidgetChatInputCategoriesAdapter.kt */
public final class CommandCategoryItem implements MGRecyclerDataPayload {
public static final Companion Companion = new Companion(null);
public static final int TYPE = 0;
private final Application application;
private final boolean isSelected;
private final String key;
private final int type;
/* compiled from: WidgetChatInputCategoriesAdapter.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
public CommandCategoryItem(Application application, boolean z2, String str, int i) {
m.checkNotNullParameter(application, "application");
m.checkNotNullParameter(str, "key");
this.application = application;
this.isSelected = z2;
this.key = str;
this.type = i;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ CommandCategoryItem(Application application, boolean z2, String str, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(application, z2, (i2 & 4) != 0 ? String.valueOf(application.getId()) : str, (i2 & 8) != 0 ? 0 : i);
}
public static /* synthetic */ CommandCategoryItem copy$default(CommandCategoryItem commandCategoryItem, Application application, boolean z2, String str, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
application = commandCategoryItem.application;
}
if ((i2 & 2) != 0) {
z2 = commandCategoryItem.isSelected;
}
if ((i2 & 4) != 0) {
str = commandCategoryItem.getKey();
}
if ((i2 & 8) != 0) {
i = commandCategoryItem.getType();
}
return commandCategoryItem.copy(application, z2, str, i);
}
public final Application component1() {
return this.application;
}
public final boolean component2() {
return this.isSelected;
}
public final String component3() {
return getKey();
}
public final int component4() {
return getType();
}
public final CommandCategoryItem copy(Application application, boolean z2, String str, int i) {
m.checkNotNullParameter(application, "application");
m.checkNotNullParameter(str, "key");
return new CommandCategoryItem(application, z2, str, i);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CommandCategoryItem)) {
return false;
}
CommandCategoryItem commandCategoryItem = (CommandCategoryItem) obj;
return m.areEqual(this.application, commandCategoryItem.application) && this.isSelected == commandCategoryItem.isSelected && m.areEqual(getKey(), commandCategoryItem.getKey()) && getType() == commandCategoryItem.getType();
}
public final Application getApplication() {
return this.application;
}
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
public String getKey() {
return this.key;
}
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
public int getType() {
return this.type;
}
public int hashCode() {
Application application = this.application;
int i = 0;
int hashCode = (application != null ? application.hashCode() : 0) * 31;
boolean z2 = this.isSelected;
if (z2) {
z2 = true;
}
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = (hashCode + i2) * 31;
String key = getKey();
if (key != null) {
i = key.hashCode();
}
return getType() + ((i5 + i) * 31);
}
public final boolean isSelected() {
return this.isSelected;
}
public String toString() {
StringBuilder L = a.L("CommandCategoryItem(application=");
L.append(this.application);
L.append(", isSelected=");
L.append(this.isSelected);
L.append(", key=");
L.append(getKey());
L.append(", type=");
L.append(getType());
L.append(")");
return L.toString();
}
}