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

    if (showNextPage) {
        NestedPage50()
        return
    }

    Column(
        modifier = Modifier
            .fillMaxSize()
            .padding(16.dp),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = "第49层页面",
            fontSize = 24.sp,
            fontWeight = FontWeight.Bold,
            color = Color(0xFF490000),
            modifier = Modifier.padding(bottom = 20.dp)
        )
        Text(
            text = "这是第721行内容",
            fontSize = 16.sp,
            color = Color(225, 79, 95),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第722行内容",
            fontSize = 16.sp,
            color = Color(242, 110, 142),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第723行内容",
            fontSize = 16.sp,
            color = Color(3, 141, 189),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第724行内容",
            fontSize = 16.sp,
            color = Color(20, 172, 236),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第725行内容",
            fontSize = 16.sp,
            color = Color(37, 203, 27),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第726行内容",
            fontSize = 16.sp,
            color = Color(54, 234, 74),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第727行内容",
            fontSize = 16.sp,
            color = Color(71, 9, 121),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第728行内容",
            fontSize = 16.sp,
            color = Color(88, 40, 168),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第729行内容",
            fontSize = 16.sp,
            color = Color(105, 71, 215),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第730行内容",
            fontSize = 16.sp,
            color = Color(122, 102, 6),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第731行内容",
            fontSize = 16.sp,
            color = Color(139, 133, 53),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第732行内容",
            fontSize = 16.sp,
            color = Color(156, 164, 100),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第733行内容",
            fontSize = 16.sp,
            color = Color(173, 195, 147),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第734行内容",
            fontSize = 16.sp,
            color = Color(190, 226, 194),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第735行内容",
            fontSize = 16.sp,
            color = Color(207, 1, 241),
            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 = "进入第50层",
                fontSize = 18.sp,
                fontWeight = FontWeight.Medium,
                color = Color.White
            )
        }
    }
}
