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

    if (showNextPage) {
        NestedPage44()
        return
    }

    Column(
        modifier = Modifier
            .fillMaxSize()
            .padding(16.dp),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = "第43层页面",
            fontSize = 24.sp,
            fontWeight = FontWeight.Bold,
            color = Color(0xFF430000),
            modifier = Modifier.padding(bottom = 20.dp)
        )
        Text(
            text = "这是第631行内容",
            fontSize = 16.sp,
            color = Color(231, 105, 217),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第632行内容",
            fontSize = 16.sp,
            color = Color(248, 136, 8),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第633行内容",
            fontSize = 16.sp,
            color = Color(9, 167, 55),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第634行内容",
            fontSize = 16.sp,
            color = Color(26, 198, 102),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第635行内容",
            fontSize = 16.sp,
            color = Color(43, 229, 149),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第636行内容",
            fontSize = 16.sp,
            color = Color(60, 4, 196),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第637行内容",
            fontSize = 16.sp,
            color = Color(77, 35, 243),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第638行内容",
            fontSize = 16.sp,
            color = Color(94, 66, 34),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第639行内容",
            fontSize = 16.sp,
            color = Color(111, 97, 81),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第640行内容",
            fontSize = 16.sp,
            color = Color(128, 128, 128),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第641行内容",
            fontSize = 16.sp,
            color = Color(145, 159, 175),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第642行内容",
            fontSize = 16.sp,
            color = Color(162, 190, 222),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第643行内容",
            fontSize = 16.sp,
            color = Color(179, 221, 13),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第644行内容",
            fontSize = 16.sp,
            color = Color(196, 252, 60),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第645行内容",
            fontSize = 16.sp,
            color = Color(213, 27, 107),
            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 = "进入第44层",
                fontSize = 18.sp,
                fontWeight = FontWeight.Medium,
                color = Color.White
            )
        }
    }
}
