package com.discord.widgets.chat.overlay; import c.d.b.a.a; import com.discord.api.channel.Channel; import com.discord.stores.StoreSlowMode; import com.discord.stores.StoreStream; import d0.z.d.m; import j0.l.a.r; import j0.l.a.u0; import j0.l.e.j; import java.util.List; import kotlin.jvm.internal.DefaultConstructorMarker; import rx.Observable; /* compiled from: ChatTypingModel.kt */ public abstract class ChatTypingModel { public static final Companion Companion = new Companion(null); /* compiled from: ChatTypingModel.kt */ public static final class Companion { private Companion() { } public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { this(); } public static final /* synthetic */ Observable access$getTypingObservableForChannel(Companion companion, Channel channel) { return companion.getTypingObservableForChannel(channel); } public static final /* synthetic */ Observable access$getTypingObservableForDraft(Companion companion, Channel channel) { return companion.getTypingObservableForDraft(channel); } public static final /* synthetic */ Observable access$getTypingUsers(Companion companion, Channel channel) { return companion.getTypingUsers(channel); } private final Observable getTypingObservableForChannel(Channel channel) { j jVar = new j(channel); Observable Y = Observable.h0(new r(jVar.i, new u0(ChatTypingModel$Companion$getTypingObservableForChannel$1.INSTANCE))).Y(ChatTypingModel$Companion$getTypingObservableForChannel$2.INSTANCE); m.checkNotNullExpressionValue(Y, "Observable.just(resolved… }\n }"); return Y; } private final Observable getTypingObservableForDraft(Channel channel) { Observable Y = StoreStream.Companion.getSlowMode().observeCooldownSecs(Long.valueOf(channel.h()), StoreSlowMode.Type.ThreadCreate.INSTANCE).Y(new ChatTypingModel$Companion$getTypingObservableForDraft$1(channel)); m.checkNotNullExpressionValue(Y, "StoreStream\n …ldownSecs))\n }"); return Y; } private final Observable> getTypingUsers(Channel channel) { Observable> r = StoreStream.Companion.getUsersTyping().observeTypingUsers(channel.h()).Y(new ChatTypingModel$Companion$getTypingUsers$1(channel)).F(ChatTypingModel$Companion$getTypingUsers$2.INSTANCE).r(); m.checkNotNullExpressionValue(r, "StoreStream\n .g… .distinctUntilChanged()"); return r; } public final Observable get() { Observable r = StoreStream.Companion.getChannelsSelected().observeResolvedSelectedChannel().Y(ChatTypingModel$Companion$get$1.INSTANCE).r(); m.checkNotNullExpressionValue(r, "StoreStream.getChannelsS… .distinctUntilChanged()"); return r; } } /* compiled from: ChatTypingModel.kt */ public static final class Hide extends ChatTypingModel { public static final Hide INSTANCE = new Hide(); private Hide() { super(null); } } /* compiled from: ChatTypingModel.kt */ public static final class Typing extends ChatTypingModel { private final int channelRateLimit; private final int cooldownSecs; private final List typingUsers; /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: java.util.List */ /* JADX WARN: Multi-variable type inference failed */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public Typing(List list, int i, int i2) { super(null); m.checkNotNullParameter(list, "typingUsers"); this.typingUsers = list; this.channelRateLimit = i; this.cooldownSecs = i2; } /* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.chat.overlay.ChatTypingModel$Typing */ /* JADX WARN: Multi-variable type inference failed */ public static /* synthetic */ Typing copy$default(Typing typing, List list, int i, int i2, int i3, Object obj) { if ((i3 & 1) != 0) { list = typing.typingUsers; } if ((i3 & 2) != 0) { i = typing.channelRateLimit; } if ((i3 & 4) != 0) { i2 = typing.cooldownSecs; } return typing.copy(list, i, i2); } public final List component1() { return this.typingUsers; } public final int component2() { return this.channelRateLimit; } public final int component3() { return this.cooldownSecs; } public final Typing copy(List list, int i, int i2) { m.checkNotNullParameter(list, "typingUsers"); return new Typing(list, i, i2); } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Typing)) { return false; } Typing typing = (Typing) obj; return m.areEqual(this.typingUsers, typing.typingUsers) && this.channelRateLimit == typing.channelRateLimit && this.cooldownSecs == typing.cooldownSecs; } public final int getChannelRateLimit() { return this.channelRateLimit; } public final int getCooldownSecs() { return this.cooldownSecs; } public final List getTypingUsers() { return this.typingUsers; } public int hashCode() { List list = this.typingUsers; return ((((list != null ? list.hashCode() : 0) * 31) + this.channelRateLimit) * 31) + this.cooldownSecs; } public String toString() { StringBuilder K = a.K("Typing(typingUsers="); K.append(this.typingUsers); K.append(", channelRateLimit="); K.append(this.channelRateLimit); K.append(", cooldownSecs="); return a.w(K, this.cooldownSecs, ")"); } } private ChatTypingModel() { } public /* synthetic */ ChatTypingModel(DefaultConstructorMarker defaultConstructorMarker) { this(); } }