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 NestedPage9() {
    var showNextPage by remember { mutableStateOf(false) }

    if (showNextPage) {
        NestedPage10()
        return
    }

    Column(
        modifier = Modifier
            .fillMaxSize()
            .padding(16.dp),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = "第9层页面",
            fontSize = 24.sp,
            fontWeight = FontWeight.Bold,
            color = Color(0xFF90000),
            modifier = Modifier.padding(bottom = 20.dp)
        )
        Text(
            text = "这是第121行内容",
            fontSize = 16.sp,
            color = Color(9, 167, 55),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第122行内容",
            fontSize = 16.sp,
            color = Color(26, 198, 102),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第123行内容",
            fontSize = 16.sp,
            color = Color(43, 229, 149),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第124行内容",
            fontSize = 16.sp,
            color = Color(60, 4, 196),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第125行内容",
            fontSize = 16.sp,
            color = Color(77, 35, 243),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第126行内容",
            fontSize = 16.sp,
            color = Color(94, 66, 34),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第127行内容",
            fontSize = 16.sp,
            color = Color(111, 97, 81),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第128行内容",
            fontSize = 16.sp,
            color = Color(128, 128, 128),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第129行内容",
            fontSize = 16.sp,
            color = Color(145, 159, 175),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第130行内容",
            fontSize = 16.sp,
            color = Color(162, 190, 222),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第131行内容",
            fontSize = 16.sp,
            color = Color(179, 221, 13),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第132行内容",
            fontSize = 16.sp,
            color = Color(196, 252, 60),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第133行内容",
            fontSize = 16.sp,
            color = Color(213, 27, 107),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第134行内容",
            fontSize = 16.sp,
            color = Color(230, 58, 154),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第135行内容",
            fontSize = 16.sp,
            color = Color(247, 89, 201),
            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 = "进入第10层",
                fontSize = 18.sp,
                fontWeight = FontWeight.Medium,
                color = Color.White
            )
        }
    }
}
