@Composable public fun Channels( channelsState: ChannelsState, lazyListState: LazyListState, onLastItemReached: () -> Unit, modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(), helperContent: @Composable BoxScope.() -> Unit = {}, loadingMoreContent: @Composable () -> Unit = { DefaultChannelsLoadingMoreIndicator() }, itemContent: @Composable (ChannelItemState) -> Unit, divider: @Composable () -> Unit, ) { val (_, isLoadingMore, endOfChannels, channelItems) = channelsState Box(modifier = modifier) { LazyColumn( modifier = Modifier.fillMaxSize(), state = lazyListState, horizontalAlignment = Alignment.CenterHorizontally, contentPadding = contentPadding ) { item { DummyFirstChannelItem() }  items( items = channelItems, key = { it.channel.cid }) { item ->itemContent(item)divider()}if (isLoadingMore) {item {loadingMoreContent()}}} if (!endOfChannels && channelItems.isNotEmpty()) {LoadMoreHandler(lazyListState) {onLastItemReached() }}helperContent()}}
Builds a list of [ChannelItem] elements, based on [channelsState] and action handlers that it receives.