package com.discord.widgets.hubs; import com.discord.api.channel.Channel; import com.discord.api.channel.ChannelUtils; import com.discord.models.hubs.DirectoryEntryCategory; import d0.z.d.m; import d0.z.d.o; import java.util.ArrayList; import java.util.List; import kotlin.jvm.functions.Function1; /* compiled from: WidgetHubDescription.kt */ public final class WidgetHubDescription$selectorArgs$1 extends o implements Function1> { public final /* synthetic */ WidgetHubDescription this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public WidgetHubDescription$selectorArgs$1(WidgetHubDescription widgetHubDescription) { super(1); this.this$0 = widgetHubDescription; } public final List invoke(HubDescriptionState hubDescriptionState) { m.checkNotNullParameter(hubDescriptionState, "state"); DirectoryEntryCategory.Companion companion = DirectoryEntryCategory.Companion; Channel channel = hubDescriptionState.getChannel(); List categories = companion.getCategories(channel != null && ChannelUtils.t(channel)); ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(categories, 10)); for (DirectoryEntryCategory directoryEntryCategory : categories) { int key = directoryEntryCategory.getKey(); DirectoryEntryCategory category = this.this$0.getViewModel().getCategory(); arrayList.add(new RadioSelectorItem(key, directoryEntryCategory.getTitle(this.this$0.requireContext()), category != null && category.getKey() == directoryEntryCategory.getKey())); } return arrayList; } }