package com.framework.mvvm.ui

import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.compositionLocalOf
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.framework.mvvm.ui.screen.FlashScreen
import com.framework.mvvm.ui.screen.LoginScreen
import com.framework.mvvm.ui.screen.ProjectScreen

val LocalNavHostController = compositionLocalOf<NavHostController?> { null }

@Composable
fun AdmApp() {
    val navController: NavHostController = rememberNavController()
    CompositionLocalProvider(LocalNavHostController provides navController) {
        NavHost(navController = navController, startDestination = "flash") {
            composable("flash") {
                FlashScreen()
            }
            composable("login") {
                LoginScreen()
            }
            composable("project") {
                ProjectScreen()
            }
        }
    }

}
