@Composable public fun FilesPicker( files: List<AttachmentPickerItemState>, onItemSelected: (AttachmentPickerItemState) -> Unit, onBrowseFilesResult: (List<Uri>) -> Unit, modifier: Modifier = Modifier, itemContent: @Composable (AttachmentPickerItemState) -> Unit = { DefaultFilesPickerItem( fileItem = it, onItemSelected = onItemSelected ) }, ) { val fileSelectContract = rememberLauncherForActivityResult(contract = SelectFilesContract()) { onBrowseFilesResult(it) }  Column(modifier = modifier) { Row(Modifier.fillMaxWidth()) { Text( modifier = Modifier.padding(16.dp), text = stringResource(id = R.string.stream_compose_recent_files), style = ChatTheme.typography.bodyBold, color = ChatTheme.colors.textHighEmphasis, )  Spacer(modifier = Modifier.weight(6f))  IconButton( content = { Icon(  painter = painterResource(id = R.drawable.stream_compose_ic_more_files), contentDescription = stringResource(id = R.string.stream_compose_send_attachment), tint = ChatTheme.colors.primaryAccent, ) }, onClick = { fileSelectContract.launch(Unit) } ) }  LazyColumn(modifier) { items(files) { fileItem -> itemContent(fileItem) } } } }
Shows the UI for files the user can pick for message attachments. Exposes the logic of selecting items and browsing for extra files.