package com.discord.widgets.guilds.invite; import c.d.b.a.a; import com.discord.api.channel.Channel; import com.discord.models.user.User; import com.discord.utilities.mg_recycler.MGRecyclerDataPayload; import d0.z.d.m; import kotlin.jvm.internal.DefaultConstructorMarker; /* compiled from: InviteSuggestionItemV2.kt */ public abstract class InviteSuggestionItemV2 implements MGRecyclerDataPayload { public static final Companion Companion = new Companion(null); public static final int TYPE_CHANNEL = 3; public static final int TYPE_EMPTY_SEARCH_RESULTS = 1; public static final int TYPE_USER = 2; /* compiled from: InviteSuggestionItemV2.kt */ public static final class ChannelItem extends InviteSuggestionItemV2 { private final Channel channel; private final boolean hasSent; private final String key; private final String searchQuery; private final int type = 3; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public ChannelItem(Channel channel, boolean z2, String str) { super(null); m.checkNotNullParameter(channel, "channel"); m.checkNotNullParameter(str, "searchQuery"); this.channel = channel; this.hasSent = z2; this.searchQuery = str; StringBuilder R = a.R("c"); R.append(String.valueOf(channel.h())); R.append(str); this.key = R.toString(); } public static /* synthetic */ ChannelItem copy$default(ChannelItem channelItem, Channel channel, boolean z2, String str, int i, Object obj) { if ((i & 1) != 0) { channel = channelItem.channel; } if ((i & 2) != 0) { z2 = channelItem.hasSent; } if ((i & 4) != 0) { str = channelItem.searchQuery; } return channelItem.copy(channel, z2, str); } public final Channel component1() { return this.channel; } public final boolean component2() { return this.hasSent; } public final String component3() { return this.searchQuery; } public final ChannelItem copy(Channel channel, boolean z2, String str) { m.checkNotNullParameter(channel, "channel"); m.checkNotNullParameter(str, "searchQuery"); return new ChannelItem(channel, z2, str); } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ChannelItem)) { return false; } ChannelItem channelItem = (ChannelItem) obj; return m.areEqual(this.channel, channelItem.channel) && this.hasSent == channelItem.hasSent && m.areEqual(this.searchQuery, channelItem.searchQuery); } public final Channel getChannel() { return this.channel; } public final boolean getHasSent() { return this.hasSent; } @Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider public String getKey() { return this.key; } public final String getSearchQuery() { return this.searchQuery; } @Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload public int getType() { return this.type; } @Override // com.discord.widgets.guilds.invite.InviteSuggestionItemV2 public boolean hasSentInvite() { return this.hasSent; } public int hashCode() { Channel channel = this.channel; int i = 0; int hashCode = (channel != null ? channel.hashCode() : 0) * 31; boolean z2 = this.hasSent; 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 str = this.searchQuery; if (str != null) { i = str.hashCode(); } return i5 + i; } public String toString() { StringBuilder R = a.R("ChannelItem(channel="); R.append(this.channel); R.append(", hasSent="); R.append(this.hasSent); R.append(", searchQuery="); return a.H(R, this.searchQuery, ")"); } } /* compiled from: InviteSuggestionItemV2.kt */ public static final class Companion { private Companion() { } public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { this(); } } /* compiled from: InviteSuggestionItemV2.kt */ public static final class SearchNoResultsItem extends InviteSuggestionItemV2 { public static final SearchNoResultsItem INSTANCE = new SearchNoResultsItem(); private static final String key = "SEARCH_NO_RESULTS"; private static final int type = 1; private SearchNoResultsItem() { super(null); } @Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider public String getKey() { return key; } @Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload public int getType() { return type; } @Override // com.discord.widgets.guilds.invite.InviteSuggestionItemV2 public boolean hasSentInvite() { return true; } } /* compiled from: InviteSuggestionItemV2.kt */ public static final class UserItem extends InviteSuggestionItemV2 { private final boolean hasSent; private final String key; private final String searchQuery; private final int type = 2; private final User user; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public UserItem(User user, boolean z2, String str) { super(null); m.checkNotNullParameter(user, "user"); m.checkNotNullParameter(str, "searchQuery"); this.user = user; this.hasSent = z2; this.searchQuery = str; StringBuilder R = a.R("u"); R.append(String.valueOf(user.getId())); R.append(str); this.key = R.toString(); } public static /* synthetic */ UserItem copy$default(UserItem userItem, User user, boolean z2, String str, int i, Object obj) { if ((i & 1) != 0) { user = userItem.user; } if ((i & 2) != 0) { z2 = userItem.hasSent; } if ((i & 4) != 0) { str = userItem.searchQuery; } return userItem.copy(user, z2, str); } public final User component1() { return this.user; } public final boolean component2() { return this.hasSent; } public final String component3() { return this.searchQuery; } public final UserItem copy(User user, boolean z2, String str) { m.checkNotNullParameter(user, "user"); m.checkNotNullParameter(str, "searchQuery"); return new UserItem(user, z2, str); } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof UserItem)) { return false; } UserItem userItem = (UserItem) obj; return m.areEqual(this.user, userItem.user) && this.hasSent == userItem.hasSent && m.areEqual(this.searchQuery, userItem.searchQuery); } public final boolean getHasSent() { return this.hasSent; } @Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider public String getKey() { return this.key; } public final String getSearchQuery() { return this.searchQuery; } @Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload public int getType() { return this.type; } public final User getUser() { return this.user; } @Override // com.discord.widgets.guilds.invite.InviteSuggestionItemV2 public boolean hasSentInvite() { return this.hasSent; } public int hashCode() { User user = this.user; int i = 0; int hashCode = (user != null ? user.hashCode() : 0) * 31; boolean z2 = this.hasSent; 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 str = this.searchQuery; if (str != null) { i = str.hashCode(); } return i5 + i; } public String toString() { StringBuilder R = a.R("UserItem(user="); R.append(this.user); R.append(", hasSent="); R.append(this.hasSent); R.append(", searchQuery="); return a.H(R, this.searchQuery, ")"); } } private InviteSuggestionItemV2() { } public /* synthetic */ InviteSuggestionItemV2(DefaultConstructorMarker defaultConstructorMarker) { this(); } public abstract boolean hasSentInvite(); }