package com.ys.bdtp.adm.mvvm.ui.screen.main

import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import com.ys.bdtp.adm.mvvm.ui.screen.flash.FlashScreen
import com.ys.bdtp.adm.mvvm.ui.screen.login.LoginScreen
import com.ys.bdtp.adm.mvvm.ui.screen.project.ProjectScreen

sealed interface Zygote {
    object Flash : Zygote
    object Login : Zygote
    object Project : Zygote
}

@Composable
fun MainScreen() {
    var state by remember { mutableStateOf<Zygote>(Zygote.Flash) }

    when (state) {
        Zygote.Flash -> {
            FlashScreen(
                block = { new ->
                    state = new
                })
        }
        Zygote.Login -> {
            LoginScreen()
        }
        Zygote.Project -> {
            ProjectScreen()
        }
    }
}