package com.zaojiao.app.feat.home.plan

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.zaojiao.app.feat.design.StatePage
import com.zaojiao.app.feat.design.UiState

@Composable
internal fun HomePlanRoute(
    viewModel: HomePlanViewModel = hiltViewModel(),
) {
    val uiState by viewModel.uiState.collectAsStateWithLifecycle()

    HomePlanPage(uiState = uiState)
}

@Composable
fun HomePlanPage(
    uiState: UiState<HomePlanState>,
) {
    StatePage(uiState = uiState) {
        Column(
            modifier = Modifier
                .fillMaxSize()
                .background(color = Color.Green)
        ) {
            todayPlanList.forEach {
                Text(
                    text = "abcdefg",
                )
            }
        }
    }
}