package com.dong.maxhap.demos.test

import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Composable
internal fun NestedPage14() {
    var showNextPage by remember { mutableStateOf(false) }

    if (showNextPage) {
        NestedPage15()
        return
    }

    Column(
        modifier = Modifier
            .fillMaxSize()
            .padding(16.dp),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = "第14层页面",
            fontSize = 24.sp,
            fontWeight = FontWeight.Bold,
            color = Color(0xFF140000),
            modifier = Modifier.padding(bottom = 20.dp)
        )
        Text(
            text = "这是第196行内容",
            fontSize = 16.sp,
            color = Color(4, 188, 252),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第197行内容",
            fontSize = 16.sp,
            color = Color(21, 219, 43),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第198行内容",
            fontSize = 16.sp,
            color = Color(38, 250, 90),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第199行内容",
            fontSize = 16.sp,
            color = Color(55, 25, 137),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第200行内容",
            fontSize = 16.sp,
            color = Color(72, 56, 184),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第201行内容",
            fontSize = 16.sp,
            color = Color(89, 87, 231),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第202行内容",
            fontSize = 16.sp,
            color = Color(106, 118, 22),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第203行内容",
            fontSize = 16.sp,
            color = Color(123, 149, 69),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第204行内容",
            fontSize = 16.sp,
            color = Color(140, 180, 116),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第205行内容",
            fontSize = 16.sp,
            color = Color(157, 211, 163),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第206行内容",
            fontSize = 16.sp,
            color = Color(174, 242, 210),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第207行内容",
            fontSize = 16.sp,
            color = Color(191, 17, 1),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第208行内容",
            fontSize = 16.sp,
            color = Color(208, 48, 48),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第209行内容",
            fontSize = 16.sp,
            color = Color(225, 79, 95),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第210行内容",
            fontSize = 16.sp,
            color = Color(242, 110, 142),
            modifier = Modifier.padding(vertical = 4.dp)
        )

        Spacer(modifier = Modifier.height(30.dp))

        Button(
            onClick = { showNextPage = true },
            modifier = Modifier
                .fillMaxWidth()
                .height(50.dp),
            colors = ButtonDefaults.buttonColors(
                backgroundColor = Color(0xFF2196F3)
            )
        ) {
            Text(
                text = "进入第15层",
                fontSize = 18.sp,
                fontWeight = FontWeight.Medium,
                color = Color.White
            )
        }
    }
}
