199 lines
8.6 KiB
Java
199 lines
8.6 KiB
Java
package com.discord.widgets.chat.input.models;
|
|
|
|
import c.d.b.a.a;
|
|
import com.discord.api.sticker.Sticker;
|
|
import com.discord.models.commands.ApplicationCommandOption;
|
|
import com.discord.widgets.chat.input.autocomplete.Autocompletable;
|
|
import com.discord.widgets.chat.input.autocomplete.EmojiAutocompletable;
|
|
import com.discord.widgets.chat.input.autocomplete.LeadingIdentifier;
|
|
import d0.z.d.m;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
/* compiled from: AutocompleteInputSelectionModel.kt */
|
|
public final class AutocompleteInputSelectionModel {
|
|
private final MentionToken autocompleteToken;
|
|
private final Map<LeadingIdentifier, List<Autocompletable>> filteredAutocompletables;
|
|
private final InputSelectionModel inputSelectionModel;
|
|
private final Set<ApplicationCommandOption> showErrorsForOptions;
|
|
private final List<Sticker> stickerMatches;
|
|
|
|
public final /* synthetic */ class WhenMappings {
|
|
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
|
|
|
static {
|
|
LeadingIdentifier.values();
|
|
int[] iArr = new int[5];
|
|
$EnumSwitchMapping$0 = iArr;
|
|
iArr[LeadingIdentifier.APP_COMMAND.ordinal()] = 1;
|
|
iArr[LeadingIdentifier.EMOJI_AND_STICKERS.ordinal()] = 2;
|
|
iArr[LeadingIdentifier.CHANNELS.ordinal()] = 3;
|
|
iArr[LeadingIdentifier.MENTION.ordinal()] = 4;
|
|
}
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.util.Map<com.discord.widgets.chat.input.autocomplete.LeadingIdentifier, ? extends java.util.List<? extends com.discord.widgets.chat.input.autocomplete.Autocompletable>> */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public AutocompleteInputSelectionModel(MentionToken mentionToken, Map<LeadingIdentifier, ? extends List<? extends Autocompletable>> map, InputSelectionModel inputSelectionModel, Set<ApplicationCommandOption> set, List<Sticker> list) {
|
|
m.checkNotNullParameter(map, "filteredAutocompletables");
|
|
m.checkNotNullParameter(inputSelectionModel, "inputSelectionModel");
|
|
m.checkNotNullParameter(set, "showErrorsForOptions");
|
|
m.checkNotNullParameter(list, "stickerMatches");
|
|
this.autocompleteToken = mentionToken;
|
|
this.filteredAutocompletables = map;
|
|
this.inputSelectionModel = inputSelectionModel;
|
|
this.showErrorsForOptions = set;
|
|
this.stickerMatches = list;
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: com.discord.widgets.chat.input.models.AutocompleteInputSelectionModel */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public static /* synthetic */ AutocompleteInputSelectionModel copy$default(AutocompleteInputSelectionModel autocompleteInputSelectionModel, MentionToken mentionToken, Map map, InputSelectionModel inputSelectionModel, Set set, List list, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
mentionToken = autocompleteInputSelectionModel.autocompleteToken;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
map = autocompleteInputSelectionModel.filteredAutocompletables;
|
|
}
|
|
if ((i & 4) != 0) {
|
|
inputSelectionModel = autocompleteInputSelectionModel.inputSelectionModel;
|
|
}
|
|
if ((i & 8) != 0) {
|
|
set = autocompleteInputSelectionModel.showErrorsForOptions;
|
|
}
|
|
if ((i & 16) != 0) {
|
|
list = autocompleteInputSelectionModel.stickerMatches;
|
|
}
|
|
return autocompleteInputSelectionModel.copy(mentionToken, map, inputSelectionModel, set, list);
|
|
}
|
|
|
|
public final MentionToken component1() {
|
|
return this.autocompleteToken;
|
|
}
|
|
|
|
public final Map<LeadingIdentifier, List<Autocompletable>> component2() {
|
|
return this.filteredAutocompletables;
|
|
}
|
|
|
|
public final InputSelectionModel component3() {
|
|
return this.inputSelectionModel;
|
|
}
|
|
|
|
public final Set<ApplicationCommandOption> component4() {
|
|
return this.showErrorsForOptions;
|
|
}
|
|
|
|
public final List<Sticker> component5() {
|
|
return this.stickerMatches;
|
|
}
|
|
|
|
public final AutocompleteInputSelectionModel copy(MentionToken mentionToken, Map<LeadingIdentifier, ? extends List<? extends Autocompletable>> map, InputSelectionModel inputSelectionModel, Set<ApplicationCommandOption> set, List<Sticker> list) {
|
|
m.checkNotNullParameter(map, "filteredAutocompletables");
|
|
m.checkNotNullParameter(inputSelectionModel, "inputSelectionModel");
|
|
m.checkNotNullParameter(set, "showErrorsForOptions");
|
|
m.checkNotNullParameter(list, "stickerMatches");
|
|
return new AutocompleteInputSelectionModel(mentionToken, map, inputSelectionModel, set, list);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof AutocompleteInputSelectionModel)) {
|
|
return false;
|
|
}
|
|
AutocompleteInputSelectionModel autocompleteInputSelectionModel = (AutocompleteInputSelectionModel) obj;
|
|
return m.areEqual(this.autocompleteToken, autocompleteInputSelectionModel.autocompleteToken) && m.areEqual(this.filteredAutocompletables, autocompleteInputSelectionModel.filteredAutocompletables) && m.areEqual(this.inputSelectionModel, autocompleteInputSelectionModel.inputSelectionModel) && m.areEqual(this.showErrorsForOptions, autocompleteInputSelectionModel.showErrorsForOptions) && m.areEqual(this.stickerMatches, autocompleteInputSelectionModel.stickerMatches);
|
|
}
|
|
|
|
public final MentionToken getAutocompleteToken() {
|
|
return this.autocompleteToken;
|
|
}
|
|
|
|
public final String getAutocompleteType() {
|
|
MentionToken mentionToken = this.autocompleteToken;
|
|
LeadingIdentifier leadingIdentifier = mentionToken != null ? mentionToken.getLeadingIdentifier() : null;
|
|
if (leadingIdentifier != null) {
|
|
int ordinal = leadingIdentifier.ordinal();
|
|
if (ordinal == 0) {
|
|
return "COMMANDS";
|
|
}
|
|
if (ordinal == 1) {
|
|
return "EMOJIS_AND_STICKERS";
|
|
}
|
|
if (ordinal == 2) {
|
|
return "CHANNELS";
|
|
}
|
|
if (ordinal == 3) {
|
|
return "MENTIONS";
|
|
}
|
|
}
|
|
return "CHOICE";
|
|
}
|
|
|
|
public final int getEmojiNumCount() {
|
|
List<Autocompletable> list = this.filteredAutocompletables.get(LeadingIdentifier.EMOJI_AND_STICKERS);
|
|
if (list == null) {
|
|
return 0;
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
for (Object obj : list) {
|
|
if (obj instanceof EmojiAutocompletable) {
|
|
arrayList.add(obj);
|
|
}
|
|
}
|
|
return arrayList.size();
|
|
}
|
|
|
|
public final Map<LeadingIdentifier, List<Autocompletable>> getFilteredAutocompletables() {
|
|
return this.filteredAutocompletables;
|
|
}
|
|
|
|
public final InputSelectionModel getInputSelectionModel() {
|
|
return this.inputSelectionModel;
|
|
}
|
|
|
|
public final Set<ApplicationCommandOption> getShowErrorsForOptions() {
|
|
return this.showErrorsForOptions;
|
|
}
|
|
|
|
public final List<Sticker> getStickerMatches() {
|
|
return this.stickerMatches;
|
|
}
|
|
|
|
public final int getStickerNumCount() {
|
|
return this.stickerMatches.size();
|
|
}
|
|
|
|
public int hashCode() {
|
|
MentionToken mentionToken = this.autocompleteToken;
|
|
int i = 0;
|
|
int hashCode = (mentionToken != null ? mentionToken.hashCode() : 0) * 31;
|
|
Map<LeadingIdentifier, List<Autocompletable>> map = this.filteredAutocompletables;
|
|
int hashCode2 = (hashCode + (map != null ? map.hashCode() : 0)) * 31;
|
|
InputSelectionModel inputSelectionModel = this.inputSelectionModel;
|
|
int hashCode3 = (hashCode2 + (inputSelectionModel != null ? inputSelectionModel.hashCode() : 0)) * 31;
|
|
Set<ApplicationCommandOption> set = this.showErrorsForOptions;
|
|
int hashCode4 = (hashCode3 + (set != null ? set.hashCode() : 0)) * 31;
|
|
List<Sticker> list = this.stickerMatches;
|
|
if (list != null) {
|
|
i = list.hashCode();
|
|
}
|
|
return hashCode4 + i;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder K = a.K("AutocompleteInputSelectionModel(autocompleteToken=");
|
|
K.append(this.autocompleteToken);
|
|
K.append(", filteredAutocompletables=");
|
|
K.append(this.filteredAutocompletables);
|
|
K.append(", inputSelectionModel=");
|
|
K.append(this.inputSelectionModel);
|
|
K.append(", showErrorsForOptions=");
|
|
K.append(this.showErrorsForOptions);
|
|
K.append(", stickerMatches=");
|
|
return a.D(K, this.stickerMatches, ")");
|
|
}
|
|
}
|