package com.peachpasswords.ui.screens import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text 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.graphics.Color import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.peachpasswords.ui.PeachNav import com.peachpasswords.ui.theme.LocalPeachAccent import com.peachpasswords.ui.theme.PeachColors import com.peachpasswords.ui.theme.PeachType import com.peachpasswords.ui.theme.ShellBackground /** * Phase-1 placeholder. Each later phase replaces the matching screen with the * real implementation; until then these prove the shell + navigation graph work. */ @Composable private fun Placeholder( title: String, subtitle: String? = null, actions: List Unit>> = emptyList(), onBack: (() -> Unit)? = null, ) { val accent = LocalPeachAccent.current ShellBackground { Column( modifier = Modifier .fillMaxSize() .systemBarsPadding() .padding(horizontal = 28.dp, vertical = 24.dp), verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally, ) { Text( text = title, color = accent, fontFamily = PeachType.Display, fontStyle = FontStyle.Italic, fontWeight = FontWeight.Light, fontSize = 34.sp, textAlign = TextAlign.Center, ) if (subtitle != null) { Text( text = subtitle, color = PeachColors.T1, fontFamily = PeachType.Mono, fontSize = 11.sp, textAlign = TextAlign.Center, modifier = Modifier.padding(top = 10.dp), ) } actions.forEach { (label, onClick) -> NavButton(label, onClick, modifier = Modifier.padding(top = 14.dp)) } if (onBack != null) { NavButton("← Back", onBack, modifier = Modifier.padding(top = 14.dp), subtle = true) } } } } @Composable private fun NavButton( label: String, onClick: () -> Unit, modifier: Modifier = Modifier, subtle: Boolean = false, ) { val accent = LocalPeachAccent.current Box( modifier = modifier .fillMaxWidth() .clip(RoundedCornerShape(12.dp)) .clickable(onClick = onClick) .padding(vertical = 14.dp), contentAlignment = Alignment.Center, ) { Text( text = label, color = if (subtle) PeachColors.T1 else accent, fontFamily = PeachType.Mono, fontSize = 13.sp, ) } } @Composable fun SettingsScreenStub(onNavigate: (PeachNav) -> Unit, onBack: () -> Unit) = Placeholder( title = "Settings", subtitle = "PHASE 1 · SETTINGS SHELL", actions = listOf( "Sync" to { onNavigate(PeachNav.SettingsSync) }, "Pair a device" to { onNavigate(PeachNav.ChirpPair) }, "Codex backup" to { onNavigate(PeachNav.CodexGenerate) }, ), onBack = onBack, ) @Composable fun SimpleStub(title: String, onBack: () -> Unit) = Placeholder(title = title, subtitle = "PHASE 1 · SHELL", onBack = onBack)