package com.discord.widgets.chat.list.adapter; import com.discord.api.sticker.BaseSticker; import com.discord.api.sticker.Sticker; import com.discord.api.sticker.StickerPartial; import com.discord.models.message.Message; import com.discord.widgets.stickers.WidgetGuildStickerSheet; import com.discord.widgets.stickers.WidgetStickerSheet; import d0.z.d.o; import java.util.Objects; import kotlin.Unit; import kotlin.jvm.functions.Function1; /* compiled from: WidgetChatListAdapterEventsHandler.kt */ public final class WidgetChatListAdapterEventsHandler$onStickerClicked$1 extends o implements Function1 { public final /* synthetic */ Message $message; public final /* synthetic */ BaseSticker $sticker; public final /* synthetic */ WidgetChatListAdapterEventsHandler this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public WidgetChatListAdapterEventsHandler$onStickerClicked$1(WidgetChatListAdapterEventsHandler widgetChatListAdapterEventsHandler, BaseSticker baseSticker, Message message) { super(1); this.this$0 = widgetChatListAdapterEventsHandler; this.$sticker = baseSticker; this.$message = message; } /* 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(BaseSticker baseSticker) { invoke(baseSticker); return Unit.a; } public final void invoke(BaseSticker baseSticker) { if (baseSticker == null) { baseSticker = this.$sticker; } if (!(baseSticker instanceof StickerPartial)) { Objects.requireNonNull(baseSticker, "null cannot be cast to non-null type com.discord.api.sticker.Sticker"); Sticker sticker = (Sticker) baseSticker; int ordinal = sticker.k().ordinal(); if (ordinal == 1) { WidgetStickerSheet.Companion.show(WidgetChatListAdapterEventsHandler.access$getFragmentManager$p(this.this$0), sticker, this.$message.getChannelId()); } else if (ordinal == 2) { WidgetGuildStickerSheet.Companion.show(WidgetChatListAdapterEventsHandler.access$getFragmentManager$p(this.this$0), sticker); } } } }