package com.syaroful.agrilinkvocpro.control_feature.navigation

import androidx.compose.runtime.Composable
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.syaroful.agrilinkvocpro.control_feature.presentation.control.ControlActuatorScreen
import com.syaroful.agrilinkvocpro.control_feature.presentation.control.ControlViewModel
import com.syaroful.agrilinkvocpro.control_feature.presentation.history.ControlHistoryScreen
import org.koin.androidx.compose.koinViewModel

@Composable
fun NavGraph(navController: NavHostController) {
    val controlViewModel: ControlViewModel = koinViewModel()

    NavHost(navController, startDestination = "control_screen") {
        composable("control_screen") {
            ControlActuatorScreen(controlViewModel, navController)
        }
        composable("control_history") {
            ControlHistoryScreen(
                navController = navController
            )
        }
    }
}