package com.discord.widgets.chat.list.actions; import com.discord.api.channel.Channel; import com.discord.api.user.User; import com.discord.models.domain.emoji.EmojiSet; import com.discord.models.guild.Guild; import com.discord.models.member.GuildMember; import com.discord.models.message.Message; import com.discord.models.user.MeUser; import com.discord.stores.StoreEmoji; import com.discord.stores.StoreStream; import com.discord.stores.StoreUser; import com.discord.widgets.chat.list.actions.WidgetChatListActions; import d0.z.d.m; import j0.k.b; import j0.l.e.j; import java.util.Map; import kotlin.Pair; import rx.Observable; import rx.functions.Func5; /* compiled from: WidgetChatListActions.kt */ public final class WidgetChatListActions$Model$Companion$get$2 implements b, Observable> { public final /* synthetic */ long $channelId; public final /* synthetic */ CharSequence $messageContent; public final /* synthetic */ int $type; /* compiled from: WidgetChatListActions.kt */ /* renamed from: com.discord.widgets.chat.list.actions.WidgetChatListActions$Model$Companion$get$2$1 reason: invalid class name */ public static final class AnonymousClass1 implements b, GuildMember> { public final /* synthetic */ long $authorId; public AnonymousClass1(long j) { this.$authorId = j; } public final GuildMember call(Map map) { return map.get(Long.valueOf(this.$authorId)); } /* 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 // j0.k.b public /* bridge */ /* synthetic */ GuildMember call(Map map) { return call((Map) map); } } /* compiled from: WidgetChatListActions.kt */ /* renamed from: com.discord.widgets.chat.list.actions.WidgetChatListActions$Model$Companion$get$2$2 reason: invalid class name */ public static final class AnonymousClass2 implements Func5 { public final /* synthetic */ Channel $channel; public final /* synthetic */ Message $message; public final /* synthetic */ WidgetChatListActions$Model$Companion$get$2 this$0; public AnonymousClass2(WidgetChatListActions$Model$Companion$get$2 widgetChatListActions$Model$Companion$get$2, Message message, Channel channel) { this.this$0 = widgetChatListActions$Model$Companion$get$2; this.$message = message; this.$channel = channel; } public final WidgetChatListActions.Model call(Long l, MeUser meUser, GuildMember guildMember, Guild guild, EmojiSet emojiSet) { WidgetChatListActions.Model.Companion companion = WidgetChatListActions.Model.Companion; Message message = this.$message; m.checkNotNullExpressionValue(meUser, "meUser"); Channel channel = this.$channel; WidgetChatListActions$Model$Companion$get$2 widgetChatListActions$Model$Companion$get$2 = this.this$0; CharSequence charSequence = widgetChatListActions$Model$Companion$get$2.$messageContent; int i = widgetChatListActions$Model$Companion$get$2.$type; m.checkNotNullExpressionValue(emojiSet, "emojis"); return WidgetChatListActions.Model.Companion.access$create(companion, message, guild, l, meUser, guildMember, channel, charSequence, i, emojiSet); } } public WidgetChatListActions$Model$Companion$get$2(long j, CharSequence charSequence, int i) { this.$channelId = j; this.$messageContent = charSequence; this.$type = i; } /* 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 // j0.k.b public /* bridge */ /* synthetic */ Observable call(Pair pair) { return call((Pair) pair); } public final Observable call(Pair pair) { User author; Message component1 = pair.component1(); Channel component2 = pair.component2(); long i = (component1 == null || (author = component1.getAuthor()) == null) ? 0 : author.i(); if (component2 == null) { return new j(null); } StoreStream.Companion companion = StoreStream.Companion; return Observable.g(companion.getPermissions().observePermissionsForChannel(this.$channelId), StoreUser.observeMe$default(companion.getUsers(), false, 1, null), companion.getGuilds().observeComputed(component2.f(), d0.t.m.listOf(Long.valueOf(i))).F(new AnonymousClass1(i)), companion.getGuilds().observeGuild(component2.f()).r(), StoreEmoji.getEmojiSet$default(companion.getEmojis(), component2.f(), component2.h(), false, false, 12, null), new AnonymousClass2(this, component1, component2)); } }