discord-jadx/app/src/main/java/com/discord/widgets/mobile_reports/MobileReportsViewModel.java

1956 lines
90 KiB
Java

package com.discord.widgets.mobile_reports;
import android.content.Context;
import androidx.core.app.NotificationCompat;
import b.d.b.a.a;
import com.discord.R;
import com.discord.api.channel.Channel;
import com.discord.api.directory.DirectoryEntryGuild;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.report.MenuAPIResponse;
import com.discord.api.report.NodeElementResult;
import com.discord.api.report.NodeResult;
import com.discord.api.report.ReportNode;
import com.discord.api.report.ReportNodeBottomButton;
import com.discord.api.report.ReportNodeChild;
import com.discord.api.report.ReportNodeElement;
import com.discord.api.report.ReportNodeElementData;
import com.discord.api.report.ReportSubmissionBody;
import com.discord.api.stageinstance.StageInstance;
import com.discord.app.AppLog;
import com.discord.app.AppViewModel;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.models.guild.Guild;
import com.discord.models.member.GuildMember;
import com.discord.models.message.Message;
import com.discord.models.user.User;
import com.discord.stores.StoreGuildScheduledEvents;
import com.discord.stores.StoreGuilds;
import com.discord.stores.StoreMessages;
import com.discord.stores.StoreStream;
import com.discord.stores.utilities.RestCallState;
import com.discord.utilities.SnowflakeUtils;
import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.error.Error;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.message.MessageUtils;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.textprocessing.DiscordParser;
import com.discord.utilities.textprocessing.MessagePreprocessor;
import com.discord.utilities.textprocessing.MessageRenderContext;
import com.discord.utilities.time.Clock;
import com.discord.utilities.time.ClockFactory;
import com.discord.widgets.mobile_reports.MobileReportArgs;
import com.facebook.drawee.span.DraweeSpanStringBuilder;
import d0.o;
import d0.t.n;
import d0.t.u;
import d0.z.d.m;
import java.lang.ref.WeakReference;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.text.Regex;
import rx.Observable;
import rx.functions.Func2;
/* compiled from: MobileReportsViewModel.kt */
public final class MobileReportsViewModel extends AppViewModel<ViewState> {
public static final Companion Companion = new Companion(null);
private final MobileReportArgs args;
private final Clock clock;
private final WeakReference<Context> context;
private final RestAPI restAPI;
/* compiled from: MobileReportsViewModel.kt */
/* renamed from: com.discord.widgets.mobile_reports.MobileReportsViewModel$1 reason: invalid class name */
public static final class AnonymousClass1<T1, T2, R> implements Func2<StoreState, MenuAPIResponse, Pair<? extends StoreState, ? extends MenuAPIResponse>> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
public final Pair<StoreState, MenuAPIResponse> call(StoreState storeState, MenuAPIResponse menuAPIResponse) {
return o.to(storeState, menuAPIResponse);
}
}
/* compiled from: MobileReportsViewModel.kt */
/* renamed from: com.discord.widgets.mobile_reports.MobileReportsViewModel$2 reason: invalid class name */
public static final class AnonymousClass2 extends d0.z.d.o implements Function1<Pair<? extends StoreState, ? extends MenuAPIResponse>, Unit> {
public final /* synthetic */ MobileReportsViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(MobileReportsViewModel mobileReportsViewModel) {
super(1);
this.this$0 = mobileReportsViewModel;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Pair<? extends StoreState, ? extends MenuAPIResponse> pair) {
invoke((Pair<StoreState, MenuAPIResponse>) pair);
return Unit.a;
}
public final void invoke(Pair<StoreState, MenuAPIResponse> pair) {
ReportNode reportNode;
StoreState component1 = pair.component1();
MenuAPIResponse component2 = pair.component2();
BlockUserElement blockUserElement = null;
if (component2 != null) {
reportNode = component2.c().get(Integer.valueOf(component2.d()));
} else {
reportNode = null;
}
if (component2 == null || reportNode == null) {
MobileReportsViewModel.access$updateViewState(this.this$0, ViewState.Invalid.INSTANCE);
return;
}
MobileReportsViewModel mobileReportsViewModel = this.this$0;
m.checkNotNullExpressionValue(component1, "storeState");
MessagePreview access$parseMessagePreview = MobileReportsViewModel.access$parseMessagePreview(mobileReportsViewModel, component1);
MobileReportsViewModel mobileReportsViewModel2 = this.this$0;
ViewState access$getViewState$p = MobileReportsViewModel.access$getViewState$p(mobileReportsViewModel2);
if (access$getViewState$p == null) {
ChannelPreview access$parseChannelPreview = MobileReportsViewModel.access$parseChannelPreview(this.this$0, component1);
NodeNavigationType.Initial initial = new NodeNavigationType.Initial(reportNode);
List emptyList = n.emptyList();
if (access$parseMessagePreview != null) {
blockUserElement = new BlockUserElement(component1.getBlockedUsers().containsKey(Long.valueOf(access$parseMessagePreview.getAuthor().getId())), access$parseMessagePreview.getAuthor());
}
access$getViewState$p = new ViewState.Menu(component2, access$parseMessagePreview, access$parseChannelPreview, MobileReportsViewModel.access$parseDirectoryServerPreview(this.this$0, component1), MobileReportsViewModel.access$parseEventPreview(this.this$0, component1), initial, null, emptyList, blockUserElement, 64, null);
}
MobileReportsViewModel.access$updateViewState(mobileReportsViewModel2, access$getViewState$p);
}
}
/* compiled from: MobileReportsViewModel.kt */
/* renamed from: com.discord.widgets.mobile_reports.MobileReportsViewModel$3 reason: invalid class name */
public static final class AnonymousClass3 extends d0.z.d.o implements Function1<Error, Unit> {
public final /* synthetic */ MobileReportsViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass3(MobileReportsViewModel mobileReportsViewModel) {
super(1);
this.this$0 = mobileReportsViewModel;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "it");
Logger.e$default(AppLog.g, "Can't parse report message? Closing report screen.", null, null, 6, null);
MobileReportsViewModel.access$updateViewState(this.this$0, ViewState.Invalid.INSTANCE);
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class BlockUserElement {
private final boolean isBlocked;
private final User user;
public BlockUserElement(boolean z2, User user) {
m.checkNotNullParameter(user, "user");
this.isBlocked = z2;
this.user = user;
}
public static /* synthetic */ BlockUserElement copy$default(BlockUserElement blockUserElement, boolean z2, User user, int i, Object obj) {
if ((i & 1) != 0) {
z2 = blockUserElement.isBlocked;
}
if ((i & 2) != 0) {
user = blockUserElement.user;
}
return blockUserElement.copy(z2, user);
}
public final boolean component1() {
return this.isBlocked;
}
public final User component2() {
return this.user;
}
public final BlockUserElement copy(boolean z2, User user) {
m.checkNotNullParameter(user, "user");
return new BlockUserElement(z2, user);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof BlockUserElement)) {
return false;
}
BlockUserElement blockUserElement = (BlockUserElement) obj;
return this.isBlocked == blockUserElement.isBlocked && m.areEqual(this.user, blockUserElement.user);
}
public final User getUser() {
return this.user;
}
public int hashCode() {
boolean z2 = this.isBlocked;
if (z2) {
z2 = true;
}
int i = z2 ? 1 : 0;
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = i * 31;
User user = this.user;
return i4 + (user != null ? user.hashCode() : 0);
}
public final boolean isBlocked() {
return this.isBlocked;
}
public String toString() {
StringBuilder R = a.R("BlockUserElement(isBlocked=");
R.append(this.isBlocked);
R.append(", user=");
R.append(this.user);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class ChannelPreview {
private final Guild guild;
private final StageInstance stageInstance;
public ChannelPreview(Guild guild, StageInstance stageInstance) {
m.checkNotNullParameter(guild, "guild");
m.checkNotNullParameter(stageInstance, "stageInstance");
this.guild = guild;
this.stageInstance = stageInstance;
}
public static /* synthetic */ ChannelPreview copy$default(ChannelPreview channelPreview, Guild guild, StageInstance stageInstance, int i, Object obj) {
if ((i & 1) != 0) {
guild = channelPreview.guild;
}
if ((i & 2) != 0) {
stageInstance = channelPreview.stageInstance;
}
return channelPreview.copy(guild, stageInstance);
}
public final Guild component1() {
return this.guild;
}
public final StageInstance component2() {
return this.stageInstance;
}
public final ChannelPreview copy(Guild guild, StageInstance stageInstance) {
m.checkNotNullParameter(guild, "guild");
m.checkNotNullParameter(stageInstance, "stageInstance");
return new ChannelPreview(guild, stageInstance);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ChannelPreview)) {
return false;
}
ChannelPreview channelPreview = (ChannelPreview) obj;
return m.areEqual(this.guild, channelPreview.guild) && m.areEqual(this.stageInstance, channelPreview.stageInstance);
}
public final Guild getGuild() {
return this.guild;
}
public final StageInstance getStageInstance() {
return this.stageInstance;
}
public int hashCode() {
Guild guild = this.guild;
int i = 0;
int hashCode = (guild != null ? guild.hashCode() : 0) * 31;
StageInstance stageInstance = this.stageInstance;
if (stageInstance != null) {
i = stageInstance.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder R = a.R("ChannelPreview(guild=");
R.append(this.guild);
R.append(", stageInstance=");
R.append(this.stageInstance);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class CheckboxElement {
private final List<ReportNodeElementData> data;
private final String name;
private final HashSet<ReportNodeElementData> selections;
public CheckboxElement(String str, List<ReportNodeElementData> list, HashSet<ReportNodeElementData> hashSet) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_NAME);
m.checkNotNullParameter(list, "data");
m.checkNotNullParameter(hashSet, "selections");
this.name = str;
this.data = list;
this.selections = hashSet;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.mobile_reports.MobileReportsViewModel$CheckboxElement */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ CheckboxElement copy$default(CheckboxElement checkboxElement, String str, List list, HashSet hashSet, int i, Object obj) {
if ((i & 1) != 0) {
str = checkboxElement.name;
}
if ((i & 2) != 0) {
list = checkboxElement.data;
}
if ((i & 4) != 0) {
hashSet = checkboxElement.selections;
}
return checkboxElement.copy(str, list, hashSet);
}
public final String component1() {
return this.name;
}
public final List<ReportNodeElementData> component2() {
return this.data;
}
public final HashSet<ReportNodeElementData> component3() {
return this.selections;
}
public final CheckboxElement copy(String str, List<ReportNodeElementData> list, HashSet<ReportNodeElementData> hashSet) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_NAME);
m.checkNotNullParameter(list, "data");
m.checkNotNullParameter(hashSet, "selections");
return new CheckboxElement(str, list, hashSet);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CheckboxElement)) {
return false;
}
CheckboxElement checkboxElement = (CheckboxElement) obj;
return m.areEqual(this.name, checkboxElement.name) && m.areEqual(this.data, checkboxElement.data) && m.areEqual(this.selections, checkboxElement.selections);
}
public final List<ReportNodeElementData> getData() {
return this.data;
}
public final String getName() {
return this.name;
}
public final HashSet<ReportNodeElementData> getSelections() {
return this.selections;
}
public int hashCode() {
String str = this.name;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
List<ReportNodeElementData> list = this.data;
int hashCode2 = (hashCode + (list != null ? list.hashCode() : 0)) * 31;
HashSet<ReportNodeElementData> hashSet = this.selections;
if (hashSet != null) {
i = hashSet.hashCode();
}
return hashCode2 + i;
}
public String toString() {
StringBuilder R = a.R("CheckboxElement(name=");
R.append(this.name);
R.append(", data=");
R.append(this.data);
R.append(", selections=");
R.append(this.selections);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final /* synthetic */ String access$getLocation(Companion companion, ReportNode reportNode) {
return companion.getLocation(reportNode);
}
public static final /* synthetic */ Observable access$getStoreState(Companion companion, MobileReportArgs mobileReportArgs) {
return companion.getStoreState(mobileReportArgs);
}
private final String getLocation(ReportNode reportNode) {
return "REPORT_MENU_NODE_" + reportNode + ".id";
}
private final Observable<StoreState> getStoreState(MobileReportArgs mobileReportArgs) {
StoreStream.Companion companion = StoreStream.Companion;
StoreMessages messages = companion.getMessages();
long channelId = mobileReportArgs.getChannelId();
MobileReportArgs.GuildScheduledEvent guildScheduledEvent = null;
MobileReportArgs.Message message = (MobileReportArgs.Message) (!(mobileReportArgs instanceof MobileReportArgs.Message) ? null : mobileReportArgs);
long j = -1;
Observable<Message> observeMessagesForChannel = messages.observeMessagesForChannel(channelId, message != null ? message.getMessageId() : -1);
Observable<Channel> observeChannel = companion.getChannels().observeChannel(mobileReportArgs.getChannelId());
Observable<Guild> observeFromChannelId = companion.getGuilds().observeFromChannelId(mobileReportArgs.getChannelId());
Observable<StageInstance> observeStageInstanceForChannel = companion.getStageInstances().observeStageInstanceForChannel(mobileReportArgs.getChannelId());
Observable<Map<Long, Integer>> observeForType = companion.getUserRelationships().observeForType(2);
Observable<RestCallState<List<DirectoryEntryGuild>>> observeDirectoriesForChannel = companion.getDirectories().observeDirectoriesForChannel(mobileReportArgs.getChannelId());
StoreGuildScheduledEvents guildScheduledEvents = companion.getGuildScheduledEvents();
boolean z2 = mobileReportArgs instanceof MobileReportArgs.GuildScheduledEvent;
MobileReportArgs.GuildScheduledEvent guildScheduledEvent2 = (MobileReportArgs.GuildScheduledEvent) (!z2 ? null : mobileReportArgs);
Long valueOf = guildScheduledEvent2 != null ? Long.valueOf(guildScheduledEvent2.getEventId()) : null;
MobileReportArgs.GuildScheduledEvent guildScheduledEvent3 = (MobileReportArgs.GuildScheduledEvent) (!z2 ? null : mobileReportArgs);
Observable<GuildScheduledEvent> observeGuildScheduledEvent = guildScheduledEvents.observeGuildScheduledEvent(valueOf, guildScheduledEvent3 != null ? Long.valueOf(guildScheduledEvent3.getGuildId()) : null);
StoreGuilds guilds = companion.getGuilds();
if (z2) {
guildScheduledEvent = mobileReportArgs;
}
MobileReportArgs.GuildScheduledEvent guildScheduledEvent4 = guildScheduledEvent;
if (guildScheduledEvent4 != null) {
j = guildScheduledEvent4.getGuildId();
}
Observable<StoreState> d = Observable.d(observeMessagesForChannel, observeChannel, observeFromChannelId, observeStageInstanceForChannel, observeForType, observeDirectoriesForChannel, observeGuildScheduledEvent, guilds.observeGuild(j), new MobileReportsViewModel$Companion$getStoreState$1(mobileReportArgs));
m.checkNotNullExpressionValue(d, "Observable.combineLatest…nt = event,\n )\n }");
return d;
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class DirectoryServerPreview {
private final DirectoryEntryGuild directoryEntry;
private final Guild hub;
public DirectoryServerPreview(Guild guild, DirectoryEntryGuild directoryEntryGuild) {
m.checkNotNullParameter(guild, "hub");
m.checkNotNullParameter(directoryEntryGuild, "directoryEntry");
this.hub = guild;
this.directoryEntry = directoryEntryGuild;
}
public static /* synthetic */ DirectoryServerPreview copy$default(DirectoryServerPreview directoryServerPreview, Guild guild, DirectoryEntryGuild directoryEntryGuild, int i, Object obj) {
if ((i & 1) != 0) {
guild = directoryServerPreview.hub;
}
if ((i & 2) != 0) {
directoryEntryGuild = directoryServerPreview.directoryEntry;
}
return directoryServerPreview.copy(guild, directoryEntryGuild);
}
public final Guild component1() {
return this.hub;
}
public final DirectoryEntryGuild component2() {
return this.directoryEntry;
}
public final DirectoryServerPreview copy(Guild guild, DirectoryEntryGuild directoryEntryGuild) {
m.checkNotNullParameter(guild, "hub");
m.checkNotNullParameter(directoryEntryGuild, "directoryEntry");
return new DirectoryServerPreview(guild, directoryEntryGuild);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DirectoryServerPreview)) {
return false;
}
DirectoryServerPreview directoryServerPreview = (DirectoryServerPreview) obj;
return m.areEqual(this.hub, directoryServerPreview.hub) && m.areEqual(this.directoryEntry, directoryServerPreview.directoryEntry);
}
public final DirectoryEntryGuild getDirectoryEntry() {
return this.directoryEntry;
}
public final Guild getHub() {
return this.hub;
}
public int hashCode() {
Guild guild = this.hub;
int i = 0;
int hashCode = (guild != null ? guild.hashCode() : 0) * 31;
DirectoryEntryGuild directoryEntryGuild = this.directoryEntry;
if (directoryEntryGuild != null) {
i = directoryEntryGuild.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder R = a.R("DirectoryServerPreview(hub=");
R.append(this.hub);
R.append(", directoryEntry=");
R.append(this.directoryEntry);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class GuildScheduledEventPreview {
private final GuildScheduledEvent event;
private final Guild guild;
public GuildScheduledEventPreview(Guild guild, GuildScheduledEvent guildScheduledEvent) {
m.checkNotNullParameter(guild, "guild");
m.checkNotNullParameter(guildScheduledEvent, "event");
this.guild = guild;
this.event = guildScheduledEvent;
}
public static /* synthetic */ GuildScheduledEventPreview copy$default(GuildScheduledEventPreview guildScheduledEventPreview, Guild guild, GuildScheduledEvent guildScheduledEvent, int i, Object obj) {
if ((i & 1) != 0) {
guild = guildScheduledEventPreview.guild;
}
if ((i & 2) != 0) {
guildScheduledEvent = guildScheduledEventPreview.event;
}
return guildScheduledEventPreview.copy(guild, guildScheduledEvent);
}
public final Guild component1() {
return this.guild;
}
public final GuildScheduledEvent component2() {
return this.event;
}
public final GuildScheduledEventPreview copy(Guild guild, GuildScheduledEvent guildScheduledEvent) {
m.checkNotNullParameter(guild, "guild");
m.checkNotNullParameter(guildScheduledEvent, "event");
return new GuildScheduledEventPreview(guild, guildScheduledEvent);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof GuildScheduledEventPreview)) {
return false;
}
GuildScheduledEventPreview guildScheduledEventPreview = (GuildScheduledEventPreview) obj;
return m.areEqual(this.guild, guildScheduledEventPreview.guild) && m.areEqual(this.event, guildScheduledEventPreview.event);
}
public final GuildScheduledEvent getEvent() {
return this.event;
}
public final Guild getGuild() {
return this.guild;
}
public int hashCode() {
Guild guild = this.guild;
int i = 0;
int hashCode = (guild != null ? guild.hashCode() : 0) * 31;
GuildScheduledEvent guildScheduledEvent = this.event;
if (guildScheduledEvent != null) {
i = guildScheduledEvent.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder R = a.R("GuildScheduledEventPreview(guild=");
R.append(this.guild);
R.append(", event=");
R.append(this.event);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class MessagePreview {
private final User author;
private final String authorName;
private final int authorNameColor;
private final boolean hasEmbeds;
private final DraweeSpanStringBuilder text;
public MessagePreview(DraweeSpanStringBuilder draweeSpanStringBuilder, String str, int i, User user, boolean z2) {
m.checkNotNullParameter(draweeSpanStringBuilder, NotificationCompat.MessagingStyle.Message.KEY_TEXT);
m.checkNotNullParameter(str, "authorName");
m.checkNotNullParameter(user, "author");
this.text = draweeSpanStringBuilder;
this.authorName = str;
this.authorNameColor = i;
this.author = user;
this.hasEmbeds = z2;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ MessagePreview(DraweeSpanStringBuilder draweeSpanStringBuilder, String str, int i, User user, boolean z2, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(draweeSpanStringBuilder, str, i, user, (i2 & 16) != 0 ? false : z2);
}
public static /* synthetic */ MessagePreview copy$default(MessagePreview messagePreview, DraweeSpanStringBuilder draweeSpanStringBuilder, String str, int i, User user, boolean z2, int i2, Object obj) {
if ((i2 & 1) != 0) {
draweeSpanStringBuilder = messagePreview.text;
}
if ((i2 & 2) != 0) {
str = messagePreview.authorName;
}
if ((i2 & 4) != 0) {
i = messagePreview.authorNameColor;
}
if ((i2 & 8) != 0) {
user = messagePreview.author;
}
if ((i2 & 16) != 0) {
z2 = messagePreview.hasEmbeds;
}
return messagePreview.copy(draweeSpanStringBuilder, str, i, user, z2);
}
public final DraweeSpanStringBuilder component1() {
return this.text;
}
public final String component2() {
return this.authorName;
}
public final int component3() {
return this.authorNameColor;
}
public final User component4() {
return this.author;
}
public final boolean component5() {
return this.hasEmbeds;
}
public final MessagePreview copy(DraweeSpanStringBuilder draweeSpanStringBuilder, String str, int i, User user, boolean z2) {
m.checkNotNullParameter(draweeSpanStringBuilder, NotificationCompat.MessagingStyle.Message.KEY_TEXT);
m.checkNotNullParameter(str, "authorName");
m.checkNotNullParameter(user, "author");
return new MessagePreview(draweeSpanStringBuilder, str, i, user, z2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof MessagePreview)) {
return false;
}
MessagePreview messagePreview = (MessagePreview) obj;
return m.areEqual(this.text, messagePreview.text) && m.areEqual(this.authorName, messagePreview.authorName) && this.authorNameColor == messagePreview.authorNameColor && m.areEqual(this.author, messagePreview.author) && this.hasEmbeds == messagePreview.hasEmbeds;
}
public final User getAuthor() {
return this.author;
}
public final String getAuthorName() {
return this.authorName;
}
public final int getAuthorNameColor() {
return this.authorNameColor;
}
public final boolean getHasEmbeds() {
return this.hasEmbeds;
}
public final DraweeSpanStringBuilder getText() {
return this.text;
}
public int hashCode() {
DraweeSpanStringBuilder draweeSpanStringBuilder = this.text;
int i = 0;
int hashCode = (draweeSpanStringBuilder != null ? draweeSpanStringBuilder.hashCode() : 0) * 31;
String str = this.authorName;
int hashCode2 = (((hashCode + (str != null ? str.hashCode() : 0)) * 31) + this.authorNameColor) * 31;
User user = this.author;
if (user != null) {
i = user.hashCode();
}
int i2 = (hashCode2 + i) * 31;
boolean z2 = this.hasEmbeds;
if (z2) {
z2 = true;
}
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = z2 ? 1 : 0;
return i2 + i3;
}
public String toString() {
StringBuilder R = a.R("MessagePreview(text=");
R.append((Object) this.text);
R.append(", authorName=");
R.append(this.authorName);
R.append(", authorNameColor=");
R.append(this.authorNameColor);
R.append(", author=");
R.append(this.author);
R.append(", hasEmbeds=");
return a.M(R, this.hasEmbeds, ")");
}
}
/* compiled from: MobileReportsViewModel.kt */
public static abstract class NodeNavigationType {
private final ReportNode node;
/* compiled from: MobileReportsViewModel.kt */
public static final class Back extends NodeNavigationType {
private final ReportNode prevNode;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Back(ReportNode reportNode) {
super(reportNode, null);
m.checkNotNullParameter(reportNode, "prevNode");
this.prevNode = reportNode;
}
private final ReportNode component1() {
return this.prevNode;
}
public static /* synthetic */ Back copy$default(Back back, ReportNode reportNode, int i, Object obj) {
if ((i & 1) != 0) {
reportNode = back.prevNode;
}
return back.copy(reportNode);
}
public final Back copy(ReportNode reportNode) {
m.checkNotNullParameter(reportNode, "prevNode");
return new Back(reportNode);
}
public boolean equals(Object obj) {
if (this != obj) {
return (obj instanceof Back) && m.areEqual(this.prevNode, ((Back) obj).prevNode);
}
return true;
}
public int hashCode() {
ReportNode reportNode = this.prevNode;
if (reportNode != null) {
return reportNode.hashCode();
}
return 0;
}
public String toString() {
StringBuilder R = a.R("Back(prevNode=");
R.append(this.prevNode);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class Initial extends NodeNavigationType {
private final ReportNode initialNode;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Initial(ReportNode reportNode) {
super(reportNode, null);
m.checkNotNullParameter(reportNode, "initialNode");
this.initialNode = reportNode;
}
private final ReportNode component1() {
return this.initialNode;
}
public static /* synthetic */ Initial copy$default(Initial initial, ReportNode reportNode, int i, Object obj) {
if ((i & 1) != 0) {
reportNode = initial.initialNode;
}
return initial.copy(reportNode);
}
public final Initial copy(ReportNode reportNode) {
m.checkNotNullParameter(reportNode, "initialNode");
return new Initial(reportNode);
}
public boolean equals(Object obj) {
if (this != obj) {
return (obj instanceof Initial) && m.areEqual(this.initialNode, ((Initial) obj).initialNode);
}
return true;
}
public int hashCode() {
ReportNode reportNode = this.initialNode;
if (reportNode != null) {
return reportNode.hashCode();
}
return 0;
}
public String toString() {
StringBuilder R = a.R("Initial(initialNode=");
R.append(this.initialNode);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class Next extends NodeNavigationType {
private final ReportNode nextNode;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Next(ReportNode reportNode) {
super(reportNode, null);
m.checkNotNullParameter(reportNode, "nextNode");
this.nextNode = reportNode;
}
private final ReportNode component1() {
return this.nextNode;
}
public static /* synthetic */ Next copy$default(Next next, ReportNode reportNode, int i, Object obj) {
if ((i & 1) != 0) {
reportNode = next.nextNode;
}
return next.copy(reportNode);
}
public final Next copy(ReportNode reportNode) {
m.checkNotNullParameter(reportNode, "nextNode");
return new Next(reportNode);
}
public boolean equals(Object obj) {
if (this != obj) {
return (obj instanceof Next) && m.areEqual(this.nextNode, ((Next) obj).nextNode);
}
return true;
}
public int hashCode() {
ReportNode reportNode = this.nextNode;
if (reportNode != null) {
return reportNode.hashCode();
}
return 0;
}
public String toString() {
StringBuilder R = a.R("Next(nextNode=");
R.append(this.nextNode);
R.append(")");
return R.toString();
}
}
private NodeNavigationType(ReportNode reportNode) {
this.node = reportNode;
}
public /* synthetic */ NodeNavigationType(ReportNode reportNode, DefaultConstructorMarker defaultConstructorMarker) {
this(reportNode);
}
public final ReportNode getNode() {
return this.node;
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class NodeState {
private final BlockUserElement blockUserElement;
private final ReportNodeBottomButton bottomButton;
private final List<NodeResult> breadcrumbsElement;
private final ChannelPreview channelPreviewElement;
private final CheckboxElement checkboxElement;
private final DirectoryServerPreview directoryServerPreviewElement;
private final GuildScheduledEventPreview eventPreviewElement;
private final MessagePreview messagePreviewElement;
private final ReportNode node;
private final SubmitState submitState;
private final boolean successElement;
public NodeState(ReportNode reportNode, CheckboxElement checkboxElement, MessagePreview messagePreview, ChannelPreview channelPreview, DirectoryServerPreview directoryServerPreview, GuildScheduledEventPreview guildScheduledEventPreview, BlockUserElement blockUserElement, List<NodeResult> list, boolean z2, SubmitState submitState, ReportNodeBottomButton reportNodeBottomButton) {
m.checkNotNullParameter(reportNode, "node");
this.node = reportNode;
this.checkboxElement = checkboxElement;
this.messagePreviewElement = messagePreview;
this.channelPreviewElement = channelPreview;
this.directoryServerPreviewElement = directoryServerPreview;
this.eventPreviewElement = guildScheduledEventPreview;
this.blockUserElement = blockUserElement;
this.breadcrumbsElement = list;
this.successElement = z2;
this.submitState = submitState;
this.bottomButton = reportNodeBottomButton;
}
public static /* synthetic */ NodeState copy$default(NodeState nodeState, ReportNode reportNode, CheckboxElement checkboxElement, MessagePreview messagePreview, ChannelPreview channelPreview, DirectoryServerPreview directoryServerPreview, GuildScheduledEventPreview guildScheduledEventPreview, BlockUserElement blockUserElement, List list, boolean z2, SubmitState submitState, ReportNodeBottomButton reportNodeBottomButton, int i, Object obj) {
return nodeState.copy((i & 1) != 0 ? nodeState.node : reportNode, (i & 2) != 0 ? nodeState.checkboxElement : checkboxElement, (i & 4) != 0 ? nodeState.messagePreviewElement : messagePreview, (i & 8) != 0 ? nodeState.channelPreviewElement : channelPreview, (i & 16) != 0 ? nodeState.directoryServerPreviewElement : directoryServerPreview, (i & 32) != 0 ? nodeState.eventPreviewElement : guildScheduledEventPreview, (i & 64) != 0 ? nodeState.blockUserElement : blockUserElement, (i & 128) != 0 ? nodeState.breadcrumbsElement : list, (i & 256) != 0 ? nodeState.successElement : z2, (i & 512) != 0 ? nodeState.submitState : submitState, (i & 1024) != 0 ? nodeState.bottomButton : reportNodeBottomButton);
}
public final ReportNode component1() {
return this.node;
}
public final SubmitState component10() {
return this.submitState;
}
public final ReportNodeBottomButton component11() {
return this.bottomButton;
}
public final CheckboxElement component2() {
return this.checkboxElement;
}
public final MessagePreview component3() {
return this.messagePreviewElement;
}
public final ChannelPreview component4() {
return this.channelPreviewElement;
}
public final DirectoryServerPreview component5() {
return this.directoryServerPreviewElement;
}
public final GuildScheduledEventPreview component6() {
return this.eventPreviewElement;
}
public final BlockUserElement component7() {
return this.blockUserElement;
}
public final List<NodeResult> component8() {
return this.breadcrumbsElement;
}
public final boolean component9() {
return this.successElement;
}
public final NodeState copy(ReportNode reportNode, CheckboxElement checkboxElement, MessagePreview messagePreview, ChannelPreview channelPreview, DirectoryServerPreview directoryServerPreview, GuildScheduledEventPreview guildScheduledEventPreview, BlockUserElement blockUserElement, List<NodeResult> list, boolean z2, SubmitState submitState, ReportNodeBottomButton reportNodeBottomButton) {
m.checkNotNullParameter(reportNode, "node");
return new NodeState(reportNode, checkboxElement, messagePreview, channelPreview, directoryServerPreview, guildScheduledEventPreview, blockUserElement, list, z2, submitState, reportNodeBottomButton);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof NodeState)) {
return false;
}
NodeState nodeState = (NodeState) obj;
return m.areEqual(this.node, nodeState.node) && m.areEqual(this.checkboxElement, nodeState.checkboxElement) && m.areEqual(this.messagePreviewElement, nodeState.messagePreviewElement) && m.areEqual(this.channelPreviewElement, nodeState.channelPreviewElement) && m.areEqual(this.directoryServerPreviewElement, nodeState.directoryServerPreviewElement) && m.areEqual(this.eventPreviewElement, nodeState.eventPreviewElement) && m.areEqual(this.blockUserElement, nodeState.blockUserElement) && m.areEqual(this.breadcrumbsElement, nodeState.breadcrumbsElement) && this.successElement == nodeState.successElement && m.areEqual(this.submitState, nodeState.submitState) && m.areEqual(this.bottomButton, nodeState.bottomButton);
}
public final BlockUserElement getBlockUserElement() {
return this.blockUserElement;
}
public final ReportNodeBottomButton getBottomButton() {
return this.bottomButton;
}
public final List<NodeResult> getBreadcrumbsElement() {
return this.breadcrumbsElement;
}
public final ChannelPreview getChannelPreviewElement() {
return this.channelPreviewElement;
}
public final CheckboxElement getCheckboxElement() {
return this.checkboxElement;
}
public final DirectoryServerPreview getDirectoryServerPreviewElement() {
return this.directoryServerPreviewElement;
}
public final GuildScheduledEventPreview getEventPreviewElement() {
return this.eventPreviewElement;
}
public final MessagePreview getMessagePreviewElement() {
return this.messagePreviewElement;
}
public final ReportNode getNode() {
return this.node;
}
public final SubmitState getSubmitState() {
return this.submitState;
}
public final boolean getSuccessElement() {
return this.successElement;
}
public int hashCode() {
ReportNode reportNode = this.node;
int i = 0;
int hashCode = (reportNode != null ? reportNode.hashCode() : 0) * 31;
CheckboxElement checkboxElement = this.checkboxElement;
int hashCode2 = (hashCode + (checkboxElement != null ? checkboxElement.hashCode() : 0)) * 31;
MessagePreview messagePreview = this.messagePreviewElement;
int hashCode3 = (hashCode2 + (messagePreview != null ? messagePreview.hashCode() : 0)) * 31;
ChannelPreview channelPreview = this.channelPreviewElement;
int hashCode4 = (hashCode3 + (channelPreview != null ? channelPreview.hashCode() : 0)) * 31;
DirectoryServerPreview directoryServerPreview = this.directoryServerPreviewElement;
int hashCode5 = (hashCode4 + (directoryServerPreview != null ? directoryServerPreview.hashCode() : 0)) * 31;
GuildScheduledEventPreview guildScheduledEventPreview = this.eventPreviewElement;
int hashCode6 = (hashCode5 + (guildScheduledEventPreview != null ? guildScheduledEventPreview.hashCode() : 0)) * 31;
BlockUserElement blockUserElement = this.blockUserElement;
int hashCode7 = (hashCode6 + (blockUserElement != null ? blockUserElement.hashCode() : 0)) * 31;
List<NodeResult> list = this.breadcrumbsElement;
int hashCode8 = (hashCode7 + (list != null ? list.hashCode() : 0)) * 31;
boolean z2 = this.successElement;
if (z2) {
z2 = true;
}
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = (hashCode8 + i2) * 31;
SubmitState submitState = this.submitState;
int hashCode9 = (i5 + (submitState != null ? submitState.hashCode() : 0)) * 31;
ReportNodeBottomButton reportNodeBottomButton = this.bottomButton;
if (reportNodeBottomButton != null) {
i = reportNodeBottomButton.hashCode();
}
return hashCode9 + i;
}
public String toString() {
StringBuilder R = a.R("NodeState(node=");
R.append(this.node);
R.append(", checkboxElement=");
R.append(this.checkboxElement);
R.append(", messagePreviewElement=");
R.append(this.messagePreviewElement);
R.append(", channelPreviewElement=");
R.append(this.channelPreviewElement);
R.append(", directoryServerPreviewElement=");
R.append(this.directoryServerPreviewElement);
R.append(", eventPreviewElement=");
R.append(this.eventPreviewElement);
R.append(", blockUserElement=");
R.append(this.blockUserElement);
R.append(", breadcrumbsElement=");
R.append(this.breadcrumbsElement);
R.append(", successElement=");
R.append(this.successElement);
R.append(", submitState=");
R.append(this.submitState);
R.append(", bottomButton=");
R.append(this.bottomButton);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class StoreState {
private final Map<Long, Integer> blockedUsers;
private final Channel channel;
private final DirectoryEntryGuild directoryEntry;
private final GuildScheduledEvent event;
private final Guild guild;
private final Message message;
private final StageInstance stageInstance;
public StoreState(Message message, Channel channel, Guild guild, DirectoryEntryGuild directoryEntryGuild, StageInstance stageInstance, Map<Long, Integer> map, GuildScheduledEvent guildScheduledEvent) {
m.checkNotNullParameter(map, "blockedUsers");
this.message = message;
this.channel = channel;
this.guild = guild;
this.directoryEntry = directoryEntryGuild;
this.stageInstance = stageInstance;
this.blockedUsers = map;
this.event = guildScheduledEvent;
}
/* JADX DEBUG: Multi-variable search result rejected for r5v0, resolved type: com.discord.widgets.mobile_reports.MobileReportsViewModel$StoreState */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ StoreState copy$default(StoreState storeState, Message message, Channel channel, Guild guild, DirectoryEntryGuild directoryEntryGuild, StageInstance stageInstance, Map map, GuildScheduledEvent guildScheduledEvent, int i, Object obj) {
if ((i & 1) != 0) {
message = storeState.message;
}
if ((i & 2) != 0) {
channel = storeState.channel;
}
if ((i & 4) != 0) {
guild = storeState.guild;
}
if ((i & 8) != 0) {
directoryEntryGuild = storeState.directoryEntry;
}
if ((i & 16) != 0) {
stageInstance = storeState.stageInstance;
}
if ((i & 32) != 0) {
map = storeState.blockedUsers;
}
if ((i & 64) != 0) {
guildScheduledEvent = storeState.event;
}
return storeState.copy(message, channel, guild, directoryEntryGuild, stageInstance, map, guildScheduledEvent);
}
public final Message component1() {
return this.message;
}
public final Channel component2() {
return this.channel;
}
public final Guild component3() {
return this.guild;
}
public final DirectoryEntryGuild component4() {
return this.directoryEntry;
}
public final StageInstance component5() {
return this.stageInstance;
}
public final Map<Long, Integer> component6() {
return this.blockedUsers;
}
public final GuildScheduledEvent component7() {
return this.event;
}
public final StoreState copy(Message message, Channel channel, Guild guild, DirectoryEntryGuild directoryEntryGuild, StageInstance stageInstance, Map<Long, Integer> map, GuildScheduledEvent guildScheduledEvent) {
m.checkNotNullParameter(map, "blockedUsers");
return new StoreState(message, channel, guild, directoryEntryGuild, stageInstance, map, guildScheduledEvent);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof StoreState)) {
return false;
}
StoreState storeState = (StoreState) obj;
return m.areEqual(this.message, storeState.message) && m.areEqual(this.channel, storeState.channel) && m.areEqual(this.guild, storeState.guild) && m.areEqual(this.directoryEntry, storeState.directoryEntry) && m.areEqual(this.stageInstance, storeState.stageInstance) && m.areEqual(this.blockedUsers, storeState.blockedUsers) && m.areEqual(this.event, storeState.event);
}
public final Map<Long, Integer> getBlockedUsers() {
return this.blockedUsers;
}
public final Channel getChannel() {
return this.channel;
}
public final DirectoryEntryGuild getDirectoryEntry() {
return this.directoryEntry;
}
public final GuildScheduledEvent getEvent() {
return this.event;
}
public final Guild getGuild() {
return this.guild;
}
public final Message getMessage() {
return this.message;
}
public final StageInstance getStageInstance() {
return this.stageInstance;
}
public int hashCode() {
Message message = this.message;
int i = 0;
int hashCode = (message != null ? message.hashCode() : 0) * 31;
Channel channel = this.channel;
int hashCode2 = (hashCode + (channel != null ? channel.hashCode() : 0)) * 31;
Guild guild = this.guild;
int hashCode3 = (hashCode2 + (guild != null ? guild.hashCode() : 0)) * 31;
DirectoryEntryGuild directoryEntryGuild = this.directoryEntry;
int hashCode4 = (hashCode3 + (directoryEntryGuild != null ? directoryEntryGuild.hashCode() : 0)) * 31;
StageInstance stageInstance = this.stageInstance;
int hashCode5 = (hashCode4 + (stageInstance != null ? stageInstance.hashCode() : 0)) * 31;
Map<Long, Integer> map = this.blockedUsers;
int hashCode6 = (hashCode5 + (map != null ? map.hashCode() : 0)) * 31;
GuildScheduledEvent guildScheduledEvent = this.event;
if (guildScheduledEvent != null) {
i = guildScheduledEvent.hashCode();
}
return hashCode6 + i;
}
public String toString() {
StringBuilder R = a.R("StoreState(message=");
R.append(this.message);
R.append(", channel=");
R.append(this.channel);
R.append(", guild=");
R.append(this.guild);
R.append(", directoryEntry=");
R.append(this.directoryEntry);
R.append(", stageInstance=");
R.append(this.stageInstance);
R.append(", blockedUsers=");
R.append(this.blockedUsers);
R.append(", event=");
R.append(this.event);
R.append(")");
return R.toString();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static abstract class SubmitState {
/* compiled from: MobileReportsViewModel.kt */
public static final class Error extends SubmitState {
public static final Error INSTANCE = new Error();
private Error() {
super(null);
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class Loading extends SubmitState {
public static final Loading INSTANCE = new Loading();
private Loading() {
super(null);
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class None extends SubmitState {
public static final None INSTANCE = new None();
private None() {
super(null);
}
}
private SubmitState() {
}
public /* synthetic */ SubmitState(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
/* compiled from: MobileReportsViewModel.kt */
public static abstract class ViewState {
/* compiled from: MobileReportsViewModel.kt */
public static final class Invalid extends ViewState {
public static final Invalid INSTANCE = new Invalid();
private Invalid() {
super(null);
}
}
/* compiled from: MobileReportsViewModel.kt */
public static final class Menu extends ViewState {
private final BlockUserElement blockUserElement;
private final ChannelPreview channelPreview;
private final DirectoryServerPreview directoryServerPreview;
private final GuildScheduledEventPreview eventPreview;
private final List<NodeResult> history;
private final MenuAPIResponse menu;
private final MessagePreview messagePreview;
private final NodeNavigationType nodeNavigationType;
private final SubmitState submitState;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Menu(MenuAPIResponse menuAPIResponse, MessagePreview messagePreview, ChannelPreview channelPreview, DirectoryServerPreview directoryServerPreview, GuildScheduledEventPreview guildScheduledEventPreview, NodeNavigationType nodeNavigationType, SubmitState submitState, List<NodeResult> list, BlockUserElement blockUserElement) {
super(null);
m.checkNotNullParameter(menuAPIResponse, "menu");
m.checkNotNullParameter(nodeNavigationType, "nodeNavigationType");
m.checkNotNullParameter(submitState, "submitState");
m.checkNotNullParameter(list, "history");
this.menu = menuAPIResponse;
this.messagePreview = messagePreview;
this.channelPreview = channelPreview;
this.directoryServerPreview = directoryServerPreview;
this.eventPreview = guildScheduledEventPreview;
this.nodeNavigationType = nodeNavigationType;
this.submitState = submitState;
this.history = list;
this.blockUserElement = blockUserElement;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ Menu(MenuAPIResponse menuAPIResponse, MessagePreview messagePreview, ChannelPreview channelPreview, DirectoryServerPreview directoryServerPreview, GuildScheduledEventPreview guildScheduledEventPreview, NodeNavigationType nodeNavigationType, SubmitState submitState, List list, BlockUserElement blockUserElement, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(menuAPIResponse, messagePreview, channelPreview, directoryServerPreview, guildScheduledEventPreview, nodeNavigationType, (i & 64) != 0 ? SubmitState.None.INSTANCE : submitState, list, blockUserElement);
}
public static /* synthetic */ Menu copy$default(Menu menu, MenuAPIResponse menuAPIResponse, MessagePreview messagePreview, ChannelPreview channelPreview, DirectoryServerPreview directoryServerPreview, GuildScheduledEventPreview guildScheduledEventPreview, NodeNavigationType nodeNavigationType, SubmitState submitState, List list, BlockUserElement blockUserElement, int i, Object obj) {
return menu.copy((i & 1) != 0 ? menu.menu : menuAPIResponse, (i & 2) != 0 ? menu.messagePreview : messagePreview, (i & 4) != 0 ? menu.channelPreview : channelPreview, (i & 8) != 0 ? menu.directoryServerPreview : directoryServerPreview, (i & 16) != 0 ? menu.eventPreview : guildScheduledEventPreview, (i & 32) != 0 ? menu.nodeNavigationType : nodeNavigationType, (i & 64) != 0 ? menu.submitState : submitState, (i & 128) != 0 ? menu.history : list, (i & 256) != 0 ? menu.blockUserElement : blockUserElement);
}
public final MenuAPIResponse component1() {
return this.menu;
}
public final MessagePreview component2() {
return this.messagePreview;
}
public final ChannelPreview component3() {
return this.channelPreview;
}
public final DirectoryServerPreview component4() {
return this.directoryServerPreview;
}
public final GuildScheduledEventPreview component5() {
return this.eventPreview;
}
public final NodeNavigationType component6() {
return this.nodeNavigationType;
}
public final SubmitState component7() {
return this.submitState;
}
public final List<NodeResult> component8() {
return this.history;
}
public final BlockUserElement component9() {
return this.blockUserElement;
}
public final Menu copy(MenuAPIResponse menuAPIResponse, MessagePreview messagePreview, ChannelPreview channelPreview, DirectoryServerPreview directoryServerPreview, GuildScheduledEventPreview guildScheduledEventPreview, NodeNavigationType nodeNavigationType, SubmitState submitState, List<NodeResult> list, BlockUserElement blockUserElement) {
m.checkNotNullParameter(menuAPIResponse, "menu");
m.checkNotNullParameter(nodeNavigationType, "nodeNavigationType");
m.checkNotNullParameter(submitState, "submitState");
m.checkNotNullParameter(list, "history");
return new Menu(menuAPIResponse, messagePreview, channelPreview, directoryServerPreview, guildScheduledEventPreview, nodeNavigationType, submitState, list, blockUserElement);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Menu)) {
return false;
}
Menu menu = (Menu) obj;
return m.areEqual(this.menu, menu.menu) && m.areEqual(this.messagePreview, menu.messagePreview) && m.areEqual(this.channelPreview, menu.channelPreview) && m.areEqual(this.directoryServerPreview, menu.directoryServerPreview) && m.areEqual(this.eventPreview, menu.eventPreview) && m.areEqual(this.nodeNavigationType, menu.nodeNavigationType) && m.areEqual(this.submitState, menu.submitState) && m.areEqual(this.history, menu.history) && m.areEqual(this.blockUserElement, menu.blockUserElement);
}
public final NodeState genNodeState() {
Object obj;
Object obj2;
CheckboxElement checkboxElement;
Object obj3;
Object obj4;
Object obj5;
Object obj6;
Object obj7;
Object obj8;
ReportNode node = this.nodeNavigationType.getNode();
List<ReportNodeElement> c = node.c();
ReportNodeElement.Companion companion = ReportNodeElement.Companion;
Iterator<T> it = c.iterator();
while (true) {
obj = null;
if (!it.hasNext()) {
obj2 = null;
break;
}
obj2 = it.next();
ReportNodeElement reportNodeElement = (ReportNodeElement) obj2;
Objects.requireNonNull(companion);
m.checkNotNullParameter(reportNodeElement, "element");
if (m.areEqual(reportNodeElement.c(), "checkbox")) {
break;
}
}
ReportNodeElement reportNodeElement2 = (ReportNodeElement) obj2;
if (reportNodeElement2 != null) {
List<ReportNodeElementData> a = reportNodeElement2.a();
checkboxElement = a == null ? null : new CheckboxElement(reportNodeElement2.b(), a, new HashSet());
} else {
checkboxElement = null;
}
List<ReportNodeElement> c2 = node.c();
ReportNodeElement.Companion companion2 = ReportNodeElement.Companion;
Iterator<T> it2 = c2.iterator();
while (true) {
if (!it2.hasNext()) {
obj3 = null;
break;
}
obj3 = it2.next();
ReportNodeElement reportNodeElement3 = (ReportNodeElement) obj3;
Objects.requireNonNull(companion2);
m.checkNotNullParameter(reportNodeElement3, "element");
if (m.areEqual(reportNodeElement3.c(), "message_preview")) {
break;
}
}
MessagePreview messagePreview = ((ReportNodeElement) obj3) != null ? this.messagePreview : null;
List<ReportNodeElement> c3 = node.c();
ReportNodeElement.Companion companion3 = ReportNodeElement.Companion;
Iterator<T> it3 = c3.iterator();
while (true) {
if (!it3.hasNext()) {
obj4 = null;
break;
}
obj4 = it3.next();
ReportNodeElement reportNodeElement4 = (ReportNodeElement) obj4;
Objects.requireNonNull(companion3);
m.checkNotNullParameter(reportNodeElement4, "element");
if (m.areEqual(reportNodeElement4.c(), "channel_preview")) {
break;
}
}
ChannelPreview channelPreview = ((ReportNodeElement) obj4) != null ? this.channelPreview : null;
List<ReportNodeElement> c4 = node.c();
ReportNodeElement.Companion companion4 = ReportNodeElement.Companion;
Iterator<T> it4 = c4.iterator();
while (true) {
if (!it4.hasNext()) {
obj5 = null;
break;
}
obj5 = it4.next();
ReportNodeElement reportNodeElement5 = (ReportNodeElement) obj5;
Objects.requireNonNull(companion4);
m.checkNotNullParameter(reportNodeElement5, "element");
if (m.areEqual(reportNodeElement5.c(), "guild_directory_entry_preview")) {
break;
}
}
DirectoryServerPreview directoryServerPreview = ((ReportNodeElement) obj5) != null ? this.directoryServerPreview : null;
List<ReportNodeElement> c5 = node.c();
ReportNodeElement.Companion companion5 = ReportNodeElement.Companion;
Iterator<T> it5 = c5.iterator();
while (true) {
if (!it5.hasNext()) {
obj6 = null;
break;
}
obj6 = it5.next();
ReportNodeElement reportNodeElement6 = (ReportNodeElement) obj6;
Objects.requireNonNull(companion5);
m.checkNotNullParameter(reportNodeElement6, "element");
if (m.areEqual(reportNodeElement6.c(), "guild_scheduled_event_preview")) {
break;
}
}
GuildScheduledEventPreview guildScheduledEventPreview = ((ReportNodeElement) obj6) != null ? this.eventPreview : null;
List<ReportNodeElement> c6 = node.c();
ReportNodeElement.Companion companion6 = ReportNodeElement.Companion;
Iterator<T> it6 = c6.iterator();
while (true) {
if (!it6.hasNext()) {
obj7 = null;
break;
}
obj7 = it6.next();
ReportNodeElement reportNodeElement7 = (ReportNodeElement) obj7;
Objects.requireNonNull(companion6);
m.checkNotNullParameter(reportNodeElement7, "element");
if (m.areEqual(reportNodeElement7.c(), "block_users")) {
break;
}
}
BlockUserElement blockUserElement = ((ReportNodeElement) obj7) != null ? this.blockUserElement : null;
List<ReportNodeElement> c7 = node.c();
ReportNodeElement.Companion companion7 = ReportNodeElement.Companion;
Iterator<T> it7 = c7.iterator();
while (true) {
if (!it7.hasNext()) {
obj8 = null;
break;
}
obj8 = it7.next();
ReportNodeElement reportNodeElement8 = (ReportNodeElement) obj8;
Objects.requireNonNull(companion7);
m.checkNotNullParameter(reportNodeElement8, "element");
if (m.areEqual(reportNodeElement8.c(), "breadcrumbs")) {
break;
}
}
List<NodeResult> list = ((ReportNodeElement) obj8) != null ? this.history : null;
List<ReportNodeElement> c8 = node.c();
ReportNodeElement.Companion companion8 = ReportNodeElement.Companion;
Iterator<T> it8 = c8.iterator();
while (true) {
if (!it8.hasNext()) {
break;
}
Object next = it8.next();
ReportNodeElement reportNodeElement9 = (ReportNodeElement) next;
Objects.requireNonNull(companion8);
m.checkNotNullParameter(reportNodeElement9, "element");
if (m.areEqual(reportNodeElement9.c(), "success")) {
obj = next;
break;
}
}
return new NodeState(node, checkboxElement, messagePreview, channelPreview, directoryServerPreview, guildScheduledEventPreview, blockUserElement, list, obj != null, this.submitState, node.a());
}
public final BlockUserElement getBlockUserElement() {
return this.blockUserElement;
}
public final ChannelPreview getChannelPreview() {
return this.channelPreview;
}
public final DirectoryServerPreview getDirectoryServerPreview() {
return this.directoryServerPreview;
}
public final GuildScheduledEventPreview getEventPreview() {
return this.eventPreview;
}
public final List<NodeResult> getHistory() {
return this.history;
}
public final MenuAPIResponse getMenu() {
return this.menu;
}
public final MessagePreview getMessagePreview() {
return this.messagePreview;
}
public final NodeNavigationType getNodeNavigationType() {
return this.nodeNavigationType;
}
public final SubmitState getSubmitState() {
return this.submitState;
}
public int hashCode() {
MenuAPIResponse menuAPIResponse = this.menu;
int i = 0;
int hashCode = (menuAPIResponse != null ? menuAPIResponse.hashCode() : 0) * 31;
MessagePreview messagePreview = this.messagePreview;
int hashCode2 = (hashCode + (messagePreview != null ? messagePreview.hashCode() : 0)) * 31;
ChannelPreview channelPreview = this.channelPreview;
int hashCode3 = (hashCode2 + (channelPreview != null ? channelPreview.hashCode() : 0)) * 31;
DirectoryServerPreview directoryServerPreview = this.directoryServerPreview;
int hashCode4 = (hashCode3 + (directoryServerPreview != null ? directoryServerPreview.hashCode() : 0)) * 31;
GuildScheduledEventPreview guildScheduledEventPreview = this.eventPreview;
int hashCode5 = (hashCode4 + (guildScheduledEventPreview != null ? guildScheduledEventPreview.hashCode() : 0)) * 31;
NodeNavigationType nodeNavigationType = this.nodeNavigationType;
int hashCode6 = (hashCode5 + (nodeNavigationType != null ? nodeNavigationType.hashCode() : 0)) * 31;
SubmitState submitState = this.submitState;
int hashCode7 = (hashCode6 + (submitState != null ? submitState.hashCode() : 0)) * 31;
List<NodeResult> list = this.history;
int hashCode8 = (hashCode7 + (list != null ? list.hashCode() : 0)) * 31;
BlockUserElement blockUserElement = this.blockUserElement;
if (blockUserElement != null) {
i = blockUserElement.hashCode();
}
return hashCode8 + i;
}
public final boolean shouldHideBackArrow() {
return (this.submitState instanceof SubmitState.Loading) || this.nodeNavigationType.getNode().e() == this.menu.e() || this.nodeNavigationType.getNode().e() == this.menu.d();
}
public String toString() {
StringBuilder R = a.R("Menu(menu=");
R.append(this.menu);
R.append(", messagePreview=");
R.append(this.messagePreview);
R.append(", channelPreview=");
R.append(this.channelPreview);
R.append(", directoryServerPreview=");
R.append(this.directoryServerPreview);
R.append(", eventPreview=");
R.append(this.eventPreview);
R.append(", nodeNavigationType=");
R.append(this.nodeNavigationType);
R.append(", submitState=");
R.append(this.submitState);
R.append(", history=");
R.append(this.history);
R.append(", blockUserElement=");
R.append(this.blockUserElement);
R.append(")");
return R.toString();
}
}
private ViewState() {
}
public /* synthetic */ ViewState(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public MobileReportsViewModel(WeakReference<Context> weakReference, MobileReportArgs mobileReportArgs, RestAPI restAPI, Clock clock, Observable<StoreState> observable) {
super(null);
m.checkNotNullParameter(weakReference, "context");
m.checkNotNullParameter(mobileReportArgs, "args");
m.checkNotNullParameter(restAPI, "restAPI");
m.checkNotNullParameter(clock, "clock");
m.checkNotNullParameter(observable, "storeStateObservable");
this.context = weakReference;
this.args = mobileReportArgs;
this.restAPI = restAPI;
this.clock = clock;
Observable j = Observable.j(ObservableExtensionsKt.computationLatest(observable), ObservableExtensionsKt.restSubscribeOn$default(restAPI.getReportMenu(mobileReportArgs.getReportType().getPathValue()), false, 1, null), AnonymousClass1.INSTANCE);
m.checkNotNullExpressionValue(j, "Observable\n .comb…> storeState to menuAPI }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(j, this, null, 2, null), MobileReportsViewModel.class, (Context) null, (Function1) null, new AnonymousClass3(this), (Function0) null, (Function0) null, new AnonymousClass2(this), 54, (Object) null);
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ MobileReportsViewModel(WeakReference weakReference, MobileReportArgs mobileReportArgs, RestAPI restAPI, Clock clock, Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(weakReference, mobileReportArgs, (i & 4) != 0 ? RestAPI.Companion.getApi() : restAPI, (i & 8) != 0 ? ClockFactory.get() : clock, (i & 16) != 0 ? Companion.access$getStoreState(Companion, mobileReportArgs) : observable);
}
public static final /* synthetic */ ViewState access$getViewState$p(MobileReportsViewModel mobileReportsViewModel) {
return mobileReportsViewModel.getViewState();
}
public static final /* synthetic */ ChannelPreview access$parseChannelPreview(MobileReportsViewModel mobileReportsViewModel, StoreState storeState) {
return mobileReportsViewModel.parseChannelPreview(storeState);
}
public static final /* synthetic */ DirectoryServerPreview access$parseDirectoryServerPreview(MobileReportsViewModel mobileReportsViewModel, StoreState storeState) {
return mobileReportsViewModel.parseDirectoryServerPreview(storeState);
}
public static final /* synthetic */ GuildScheduledEventPreview access$parseEventPreview(MobileReportsViewModel mobileReportsViewModel, StoreState storeState) {
return mobileReportsViewModel.parseEventPreview(storeState);
}
public static final /* synthetic */ MessagePreview access$parseMessagePreview(MobileReportsViewModel mobileReportsViewModel, StoreState storeState) {
return mobileReportsViewModel.parseMessagePreview(storeState);
}
public static final /* synthetic */ void access$updateViewState(MobileReportsViewModel mobileReportsViewModel, ViewState viewState) {
mobileReportsViewModel.updateViewState(viewState);
}
private final ChannelPreview parseChannelPreview(StoreState storeState) {
StageInstance stageInstance;
Guild guild = storeState.getGuild();
if (guild == null || (stageInstance = storeState.getStageInstance()) == null) {
return null;
}
return new ChannelPreview(guild, stageInstance);
}
private final DirectoryServerPreview parseDirectoryServerPreview(StoreState storeState) {
DirectoryEntryGuild directoryEntry;
Guild guild = storeState.getGuild();
if (guild == null || (directoryEntry = storeState.getDirectoryEntry()) == null) {
return null;
}
return new DirectoryServerPreview(guild, directoryEntry);
}
private final GuildScheduledEventPreview parseEventPreview(StoreState storeState) {
Guild guild;
GuildScheduledEvent event = storeState.getEvent();
if (event == null || (guild = storeState.getGuild()) == null) {
return null;
}
return new GuildScheduledEventPreview(guild, event);
}
private final MessagePreview parseMessagePreview(StoreState storeState) {
Message message;
Map<Long, String> map;
Long l;
Context context = this.context.get();
Long l2 = null;
if (context != null) {
m.checkNotNullExpressionValue(context, "context.get() ?: return null");
Channel channel = storeState.getChannel();
if (!(channel == null || (message = storeState.getMessage()) == null)) {
StoreStream.Companion companion = StoreStream.Companion;
Map<Long, User> users = companion.getUsers().getUsers();
com.discord.api.user.User author = message.getAuthor();
User user = users.get(author != null ? Long.valueOf(author.i()) : null);
if (user == null || (getViewState() instanceof ViewState.Invalid)) {
return null;
}
long id2 = companion.getUsers().getMe().getId();
Map map2 = (Map) a.u0(channel, companion.getGuilds().getMembers());
if (map2 == null) {
map2 = new HashMap();
}
Map map3 = (Map) a.u0(channel, companion.getGuilds().getRoles());
Map<Long, String> channelNames = companion.getChannels().getChannelNames();
Map<Long, String> nickOrUsernames = MessageUtils.getNickOrUsernames(message, channel, map2, channel.n());
String content = message.getContent();
DraweeSpanStringBuilder parseChannelMessage = DiscordParser.parseChannelMessage(context, content != null ? new Regex("\n").replace(content, " ") : null, new MessageRenderContext(context, id2, false, nickOrUsernames, channelNames, map3, 0, null, null, 0, 0, null, null, null, 16320, null), new MessagePreprocessor(id2, null, null, false, 50, 6, null), DiscordParser.ParserOptions.REPLY, false);
com.discord.api.user.User author2 = message.getAuthor();
if (author2 != null) {
l = Long.valueOf(author2.i());
map = nickOrUsernames;
} else {
map = nickOrUsernames;
l = null;
}
String str = map.get(l);
if (str == null) {
com.discord.api.user.User author3 = message.getAuthor();
str = author3 != null ? author3.r() : null;
}
if (str == null) {
str = "";
}
GuildMember.Companion companion2 = GuildMember.Companion;
com.discord.api.user.User author4 = message.getAuthor();
if (author4 != null) {
l2 = Long.valueOf(author4.i());
}
return new MessagePreview(parseChannelMessage, str, companion2.getColor((GuildMember) map2.get(l2), ColorCompat.getThemedColor(context, (int) R.attr.colorHeaderPrimary)), user, message.hasEmbeds() || message.hasAttachments());
}
}
return null;
}
public final boolean handleBack() {
ViewState viewState = getViewState();
ReportNode reportNode = null;
if (!(viewState instanceof ViewState.Menu)) {
viewState = null;
}
ViewState.Menu menu = (ViewState.Menu) viewState;
if (menu == null) {
return false;
}
NodeResult nodeResult = (NodeResult) u.lastOrNull((List<? extends Object>) menu.getHistory());
if (nodeResult != null) {
reportNode = nodeResult.c();
}
ReportNode node = menu.getNodeNavigationType().getNode();
MenuAPIResponse menu2 = menu.getMenu();
if (menu2.e() != node.e() && !(menu.getSubmitState() instanceof SubmitState.Loading)) {
if (reportNode == null || menu2.d() == node.e()) {
return false;
}
updateViewState(ViewState.Menu.copy$default(menu, null, null, null, null, null, new NodeNavigationType.Back(reportNode), null, u.dropLast(menu.getHistory(), 1), null, 351, null));
}
return true;
}
public final void handleBlockUser() {
ViewState viewState = getViewState();
if (!(viewState instanceof ViewState.Menu)) {
viewState = null;
}
ViewState.Menu menu = (ViewState.Menu) viewState;
if (menu != null) {
ReportNode node = menu.getNodeNavigationType().getNode();
BlockUserElement blockUserElement = menu.getBlockUserElement();
if (blockUserElement != null) {
updateViewState(ViewState.Menu.copy$default(menu, null, null, null, null, null, null, null, null, BlockUserElement.copy$default(blockUserElement, true, null, 2, null), 255, null));
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.addRelationship$default(this.restAPI, Companion.access$getLocation(Companion, node), blockUserElement.getUser().getId(), 2, null, null, 24, null), false, 1, null), this, null, 2, null), MobileReportsViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, MobileReportsViewModel$handleBlockUser$1.INSTANCE, 62, (Object) null);
}
}
}
public final void handleNext(ReportNodeChild reportNodeChild, NodeElementResult nodeElementResult) {
ReportNode reportNode;
m.checkNotNullParameter(reportNodeChild, "destination");
ViewState viewState = getViewState();
if (!(viewState instanceof ViewState.Menu)) {
viewState = null;
}
ViewState.Menu menu = (ViewState.Menu) viewState;
if (menu != null && (reportNode = menu.getMenu().c().get(Integer.valueOf(reportNodeChild.b()))) != null) {
updateViewState(ViewState.Menu.copy$default(menu, null, null, null, null, null, new NodeNavigationType.Next(reportNode), SubmitState.None.INSTANCE, u.plus((Collection<? extends NodeResult>) menu.getHistory(), new NodeResult(menu.getNodeNavigationType().getNode(), reportNodeChild, nodeElementResult)), null, 287, null));
}
}
public final void handleSubmit() {
ReportSubmissionBody reportSubmissionBody;
Guild guild;
ViewState viewState = getViewState();
if (!(viewState instanceof ViewState.Menu)) {
viewState = null;
}
ViewState.Menu menu = (ViewState.Menu) viewState;
if (menu != null && !(menu.getSubmitState() instanceof SubmitState.Loading)) {
updateViewState(ViewState.Menu.copy$default(menu, null, null, null, null, null, null, SubmitState.Loading.INSTANCE, null, null, 447, null));
MobileReportArgs mobileReportArgs = this.args;
if (mobileReportArgs instanceof MobileReportArgs.Message) {
ReportSubmissionBody.Companion companion = ReportSubmissionBody.Companion;
long currentTimeMillis = (this.clock.currentTimeMillis() - SnowflakeUtils.DISCORD_EPOCH) << 22;
long channelId = this.args.getChannelId();
long messageId = ((MobileReportArgs.Message) this.args).getMessageId();
MenuAPIResponse menu2 = menu.getMenu();
List<NodeResult> history = menu.getHistory();
Objects.requireNonNull(companion);
m.checkNotNullParameter(menu2, "menu");
m.checkNotNullParameter(history, "results");
Pair<List<Integer>, Map<String, List<String>>> a = companion.a(history);
List<Integer> component1 = a.component1();
Map<String, List<String>> component2 = a.component2();
Long valueOf = Long.valueOf(messageId);
Long valueOf2 = Long.valueOf(channelId);
String b2 = menu2.b();
String a2 = menu2.a();
reportSubmissionBody = new ReportSubmissionBody(currentTimeMillis, valueOf, valueOf2, null, null, null, a2 != null ? a2 : "en", menu2.f(), b2, menu2.g(), component1, component2, 56);
} else if (mobileReportArgs instanceof MobileReportArgs.StageChannel) {
ChannelPreview channelPreview = menu.getChannelPreview();
if (channelPreview == null || (guild = channelPreview.getGuild()) == null) {
Logger.e$default(AppLog.g, "Tried to send report for stage channel, but without guild id?", null, null, 6, null);
return;
}
long id2 = guild.getId();
ReportSubmissionBody.Companion companion2 = ReportSubmissionBody.Companion;
long currentTimeMillis2 = (this.clock.currentTimeMillis() - SnowflakeUtils.DISCORD_EPOCH) << 22;
long channelId2 = this.args.getChannelId();
MenuAPIResponse menu3 = menu.getMenu();
List<NodeResult> history2 = menu.getHistory();
Objects.requireNonNull(companion2);
m.checkNotNullParameter(menu3, "menu");
m.checkNotNullParameter(history2, "results");
Pair<List<Integer>, Map<String, List<String>>> a3 = companion2.a(history2);
List<Integer> component12 = a3.component1();
Map<String, List<String>> component22 = a3.component2();
Long valueOf3 = Long.valueOf(id2);
Long valueOf4 = Long.valueOf(channelId2);
String b3 = menu3.b();
String a4 = menu3.a();
reportSubmissionBody = new ReportSubmissionBody(currentTimeMillis2, null, valueOf4, valueOf3, null, null, a4 != null ? a4 : "en", menu3.f(), b3, menu3.g(), component12, component22, 50);
} else if (mobileReportArgs instanceof MobileReportArgs.DirectoryServer) {
ReportSubmissionBody.Companion companion3 = ReportSubmissionBody.Companion;
long currentTimeMillis3 = (this.clock.currentTimeMillis() - SnowflakeUtils.DISCORD_EPOCH) << 22;
long channelId3 = this.args.getChannelId();
long guildId = ((MobileReportArgs.DirectoryServer) this.args).getGuildId();
long hubId = ((MobileReportArgs.DirectoryServer) this.args).getHubId();
MenuAPIResponse menu4 = menu.getMenu();
List<NodeResult> history3 = menu.getHistory();
Objects.requireNonNull(companion3);
m.checkNotNullParameter(menu4, "menu");
m.checkNotNullParameter(history3, "results");
Pair<List<Integer>, Map<String, List<String>>> a5 = companion3.a(history3);
List<Integer> component13 = a5.component1();
Map<String, List<String>> component23 = a5.component2();
Long valueOf5 = Long.valueOf(guildId);
Long valueOf6 = Long.valueOf(channelId3);
Long valueOf7 = Long.valueOf(hubId);
String b4 = menu4.b();
String a6 = menu4.a();
reportSubmissionBody = new ReportSubmissionBody(currentTimeMillis3, null, valueOf6, valueOf5, valueOf7, null, a6 != null ? a6 : "en", menu4.f(), b4, menu4.g(), component13, component23, 34);
} else if (mobileReportArgs instanceof MobileReportArgs.GuildScheduledEvent) {
ReportSubmissionBody.Companion companion4 = ReportSubmissionBody.Companion;
long currentTimeMillis4 = (this.clock.currentTimeMillis() - SnowflakeUtils.DISCORD_EPOCH) << 22;
long guildId2 = ((MobileReportArgs.GuildScheduledEvent) this.args).getGuildId();
long eventId = ((MobileReportArgs.GuildScheduledEvent) this.args).getEventId();
MenuAPIResponse menu5 = menu.getMenu();
List<NodeResult> history4 = menu.getHistory();
Objects.requireNonNull(companion4);
m.checkNotNullParameter(menu5, "menu");
m.checkNotNullParameter(history4, "results");
Pair<List<Integer>, Map<String, List<String>>> a7 = companion4.a(history4);
List<Integer> component14 = a7.component1();
Map<String, List<String>> component24 = a7.component2();
Long valueOf8 = Long.valueOf(guildId2);
Long valueOf9 = Long.valueOf(eventId);
String b5 = menu5.b();
String a8 = menu5.a();
reportSubmissionBody = new ReportSubmissionBody(currentTimeMillis4, null, null, valueOf8, null, valueOf9, a8 != null ? a8 : "en", menu5.f(), b5, menu5.g(), component14, component24, 22);
} else {
throw new NoWhenBranchMatchedException();
}
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.submitReport(this.args.getReportType().getPathValue(), reportSubmissionBody), false, 1, null), this, null, 2, null), MobileReportsViewModel.class, (Context) null, (Function1) null, new MobileReportsViewModel$handleSubmit$2(this, menu), (Function0) null, (Function0) null, new MobileReportsViewModel$handleSubmit$1(this, menu), 54, (Object) null);
}
}
}