package com.discord.widgets.chat.list.adapter; import android.content.Context; import android.view.View; import com.discord.api.message.MessageReference; import com.discord.models.experiments.domain.Experiment; import com.discord.models.message.Message; import com.discord.stores.StoreExperiments; import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.Traits; import com.discord.utilities.channel.ChannelSelector; import com.discord.utilities.view.text.LinkifiedTextView; import com.discord.widgets.servers.guildboost.WidgetGuildBoost; import d0.z.d.m; /* compiled from: WidgetChatListAdapterItemSystemMessage.kt */ public final class WidgetChatListAdapterItemSystemMessage$onConfigure$1 implements View.OnClickListener { public final /* synthetic */ Message $message; public final /* synthetic */ StoreExperiments $storeExperiments; public final /* synthetic */ WidgetChatListAdapterItemSystemMessage this$0; public WidgetChatListAdapterItemSystemMessage$onConfigure$1(WidgetChatListAdapterItemSystemMessage widgetChatListAdapterItemSystemMessage, Message message, StoreExperiments storeExperiments) { this.this$0 = widgetChatListAdapterItemSystemMessage; this.$message = message; this.$storeExperiments = storeExperiments; } @Override // android.view.View.OnClickListener public final void onClick(View view) { Integer type = this.$message.getType(); if (type != null && type.intValue() == 7) { WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getEventHandler().onMessageAuthorNameClicked(this.$message, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId()); } else if ((type != null && type.intValue() == 8) || ((type != null && type.intValue() == 9) || ((type != null && type.intValue() == 10) || (type != null && type.intValue() == 11)))) { boolean z2 = true; Experiment guildExperiment = this.$storeExperiments.getGuildExperiment("2022-01_boost_announcement_upsell", WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId(), true); if (guildExperiment == null || guildExperiment.getBucket() != 1) { z2 = false; } if (z2) { AnalyticsTracker.guildBoostPromotionOpened$default(AnalyticsTracker.INSTANCE, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId(), new Traits.Location(null, Traits.Location.Section.CHANNEL_TEXT_AREA, Traits.Location.Obj.BOOST_GEM_ICON, null, null, 25, null), null, 4, null); WidgetGuildBoost.Companion companion = WidgetGuildBoost.Companion; LinkifiedTextView linkifiedTextView = WidgetChatListAdapterItemSystemMessage.access$getBinding$p(this.this$0).d; m.checkNotNullExpressionValue(linkifiedTextView, "binding.systemText"); Context context = linkifiedTextView.getContext(); m.checkNotNullExpressionValue(context, "binding.systemText.context"); companion.create(context, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId()); return; } WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getEventHandler().onMessageAuthorNameClicked(this.$message, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId()); } else if (type != null && type.intValue() == 12) { WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getEventHandler().onMessageAuthorNameClicked(this.$message, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId()); } else if (type != null && type.intValue() == 6) { WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getEventHandler().onOpenPinsClicked(this.$message); } else if (type != null && type.intValue() == 18) { MessageReference messageReference = this.$message.getMessageReference(); Long a = messageReference != null ? messageReference.a() : null; if (a != null) { ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId(), a.longValue(), null, null, 12, null); } } } }