package com.suno.android.ui.screens.songdetails import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.Switch import androidx.compose.material3.SwitchDefaults import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.suno.android.common_ui.theme.ExtendedTheme import com.suno.android.common_res.R as CommonResR import com.suno.android.common_ui.R as CommonUiR @Composable fun SongDetailsMoreOptionsScreen( viewModel: SongDetailsViewModel, isInPostingMode: Boolean, ) { val state by viewModel.state.collectAsStateWithLifecycle() Column(modifier = Modifier.fillMaxSize()) { SongDetailsOptionRow( text = stringResource(CommonResR.string.song_details_more_options_toggle_allow_comments), iconRes = CommonUiR.drawable.comments, rightContent = { Switch( checked = state.allowComments, colors = SwitchDefaults.colors( checkedTrackColor = ExtendedTheme.colors.sunoPink, ), onCheckedChange = { viewModel.sendEvent( SongDetailsMviEvent.SongAllowCommentsToggled( isInPostingMode = isInPostingMode, enabled = it, ), ) }, ) }, onClick = { viewModel.sendEvent( SongDetailsMviEvent.SongAllowCommentsToggled( isInPostingMode = isInPostingMode, enabled = !state.allowComments, ), ) }, ) } }