@Composable public fun CommandSuggestionList(commands: List<Command>,modifier: Modifier = Modifier,onCommandSelected: (Command) -> Unit = {},itemContent: @Composable (Command) -> Unit = { command -> DefaultCommandSuggestionItem( command = command, onCommandSelected = onCommandSelected, ) }, ) { SuggestionList( modifier = modifier.fillMaxWidth() .heightIn(max = ChatTheme.dimens.suggestionListMaxHeight) .padding(ChatTheme.dimens.suggestionListPadding), headerContent = {Row(modifier = Modifier.fillMaxWidth().height(40.dp),verticalAlignment = Alignment.CenterVertically) {Icon(modifier = Modifier.padding(horizontal = 8.dp).size(24.dp),painter = painterResource(id = R.drawable.stream_compose_ic_command),tint = ChatTheme.colors.primaryAccent,contentDescription = null)Text( text = stringResource(id = R.string.stream_compose_message_composer_instant_commands),style = ChatTheme.typography.body,maxLines = 1,color = ChatTheme.colors.textLowEmphasis)}}) {LazyColumn(horizontalAlignment = Alignment.CenterHorizontally) {items(items = commands,key = Command::name) { command -> itemContent(command)}}}}
Represents the command suggestion list popup.