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

    if (showNextPage) {
        NestedPage42()
        return
    }

    Column(
        modifier = Modifier
            .fillMaxSize()
            .padding(16.dp),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = "第41层页面",
            fontSize = 24.sp,
            fontWeight = FontWeight.Bold,
            color = Color(0xFF410000),
            modifier = Modifier.padding(bottom = 20.dp)
        )
        Text(
            text = "这是第601行内容",
            fontSize = 16.sp,
            color = Color(233, 199, 87),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第602行内容",
            fontSize = 16.sp,
            color = Color(250, 230, 134),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第603行内容",
            fontSize = 16.sp,
            color = Color(11, 5, 181),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第604行内容",
            fontSize = 16.sp,
            color = Color(28, 36, 228),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第605行内容",
            fontSize = 16.sp,
            color = Color(45, 67, 19),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第606行内容",
            fontSize = 16.sp,
            color = Color(62, 98, 66),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第607行内容",
            fontSize = 16.sp,
            color = Color(79, 129, 113),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第608行内容",
            fontSize = 16.sp,
            color = Color(96, 160, 160),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第609行内容",
            fontSize = 16.sp,
            color = Color(113, 191, 207),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第610行内容",
            fontSize = 16.sp,
            color = Color(130, 222, 254),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第611行内容",
            fontSize = 16.sp,
            color = Color(147, 253, 45),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第612行内容",
            fontSize = 16.sp,
            color = Color(164, 28, 92),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第613行内容",
            fontSize = 16.sp,
            color = Color(181, 59, 139),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第614行内容",
            fontSize = 16.sp,
            color = Color(198, 90, 186),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第615行内容",
            fontSize = 16.sp,
            color = Color(215, 121, 233),
            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 = "进入第42层",
                fontSize = 18.sp,
                fontWeight = FontWeight.Medium,
                color = Color.White
            )
        }
    }
}
