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

    if (showNextPage) {
        NestedPage9()
        return
    }

    Column(
        modifier = Modifier
            .fillMaxSize()
            .padding(16.dp),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = "第8层页面",
            fontSize = 24.sp,
            fontWeight = FontWeight.Bold,
            color = Color(0xFF80000),
            modifier = Modifier.padding(bottom = 20.dp)
        )
        Text(
            text = "这是第106行内容",
            fontSize = 16.sp,
            color = Color(10, 214, 118),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第107行内容",
            fontSize = 16.sp,
            color = Color(27, 245, 165),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第108行内容",
            fontSize = 16.sp,
            color = Color(44, 20, 212),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第109行内容",
            fontSize = 16.sp,
            color = Color(61, 51, 3),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第110行内容",
            fontSize = 16.sp,
            color = Color(78, 82, 50),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第111行内容",
            fontSize = 16.sp,
            color = Color(95, 113, 97),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第112行内容",
            fontSize = 16.sp,
            color = Color(112, 144, 144),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第113行内容",
            fontSize = 16.sp,
            color = Color(129, 175, 191),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第114行内容",
            fontSize = 16.sp,
            color = Color(146, 206, 238),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第115行内容",
            fontSize = 16.sp,
            color = Color(163, 237, 29),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第116行内容",
            fontSize = 16.sp,
            color = Color(180, 12, 76),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第117行内容",
            fontSize = 16.sp,
            color = Color(197, 43, 123),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第118行内容",
            fontSize = 16.sp,
            color = Color(214, 74, 170),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第119行内容",
            fontSize = 16.sp,
            color = Color(231, 105, 217),
            modifier = Modifier.padding(vertical = 4.dp)
        )
        Text(
            text = "这是第120行内容",
            fontSize = 16.sp,
            color = Color(248, 136, 8),
            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 = "进入第9层",
                fontSize = 18.sp,
                fontWeight = FontWeight.Medium,
                color = Color.White
            )
        }
    }
}
