@Composable public fun GroupAvatar( users: List<User>, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, textStyle: TextStyle = ChatTheme.typography.captionBold, onClick: (() -> Unit)? = null, ) { val avatarUsers = users.take(DefaultNumberOfAvatars) val imageCount = avatarUsers.size  val clickableModifier: Modifier = if (onClick != null) { modifier.clickable( onClick = onClick, indication = rememberRipple(bounded = false), interactionSource = remember { MutableInteractionSource() } ) } else { modifier }  Row(clickableModifier.clip(shape)) { Column( modifier = Modifier .weight(1f, fill = false).fillMaxHeight()) {for (imageIndex in 0 until imageCount step 2) {if (imageIndex < imageCount) {UserAvatar(modifier = Modifier.weight(1f).fillMaxSize(),user = avatarUsers[imageIndex],shape =  RectangleShape,textStyle = textStyle,showOnlineIndicator = false,initialsAvatarOffset = getAvatarPositionOffset(dimens = ChatTheme.dimens,userPosition = imageIndex, memberCount = imageCount))}}}Column(modifier = Modifier.weight(1f, fill = false).fillMaxHeight()) {for (imageIndex in 1 until imageCount step 2) {if (imageIndex < imageCount) {UserAvatar(modifier = Modifier.weight(1f).fillMaxSize(),user = avatarUsers[imageIndex],shape = RectangleShape,textStyle = textStyle,showOnlineIndicator = false,initialsAvatarOffset = getAvatarPositionOffset(dimens = ChatTheme.dimens,userPosition = imageIndex,memberCount = imageCount))}}}}}
Represents an avatar with a matrix of user images or initials.