package com.suno.android.common_ui.components.dialogs import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.paint import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.suno.android.common_ui.components.omni.CircleIconButton import com.suno.android.common_ui.theme.ExtendedTheme import com.suno.android.common_ui.theme.SunoTheme import com.suno.android.common_res.R as CommonResR import com.suno.android.common_ui.R as CommonUIR @Composable fun V45PlusDialogContent( ctaText: String?, onLeftActionClick: () -> Unit, onDismiss: () -> Unit, ) { Column( modifier = Modifier .clip(RoundedCornerShape(32.dp)) .background( brush = Brush.horizontalGradient( colors = listOf(Color.White, Color(0xFFFF9C35)), ), ) .width(310.dp) .padding(32.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp), ) { Row( modifier = Modifier .fillMaxWidth() .padding(bottom = 12.dp), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically, ) { Text( modifier = Modifier .background(color = ExtendedTheme.colors.aukPink, shape = RoundedCornerShape(48.dp)) .padding(horizontal = 8.dp, vertical = 2.dp), text = stringResource(CommonResR.string.NEW_MODEL), style = ExtendedTheme.typography.smallBody, color = Color.Black, ) CircleIconButton( vectorDrawableResId = CommonUIR.drawable.close, bgColor = Color.White, iconColor = Color.Black, contentDescription = stringResource(CommonResR.string.close), onClick = { onDismiss.invoke() }, ) } Box( modifier = Modifier .aspectRatio(1f) .fillMaxWidth() .clip(RoundedCornerShape(20.dp)) .paint( painter = painterResource(CommonUIR.drawable.v45plus_dialog_graphic), contentScale = ContentScale.Crop, ), ) Text( modifier = Modifier .width(300.dp) .padding(top = 24.dp), text = stringResource(CommonResR.string.v45plus_upsell_dialog_header), style = ExtendedTheme.typography.mediumHeadline, color = Color.Black, textAlign = TextAlign.Left, ) Text( modifier = Modifier.width(250.dp), text = stringResource(CommonResR.string.v45plus_upsell_dialog_body), style = ExtendedTheme.typography.smallBody, color = Color.Black, textAlign = TextAlign.Justify, ) Row( modifier = Modifier .padding(top = 12.dp) .fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically, ) { TextButton( modifier = Modifier .background(color = Color.White, shape = RoundedCornerShape(32.dp)) .padding(horizontal = 8.dp), onClick = { onLeftActionClick.invoke() }, ) { Text( text = ctaText ?: stringResource(CommonResR.string.upgrade_now), color = Color.Black, style = ExtendedTheme.typography.body, ) } } } } @Preview @Composable private fun v45Dialog_Preview() { SunoTheme { V45PlusDialogContent( ctaText = "", onLeftActionClick = {}, onDismiss = {}, ) } }