package com.diegocayo.organizame.presentation.navigation

import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import androidx.navigation.compose.composable
import androidx.navigation.navigation
import com.diegocayo.organizame.presentation.features.welcome.firstStep.FirstStepScreen
import com.diegocayo.organizame.presentation.features.welcome.grettings.GrettingScreen

fun NavGraphBuilder.firstStepNavGraph(navController: NavHostController) {
    navigation(
        startDestination = AppScreen.Welcome.FirstSteps.route,
        route = AppScreen.Welcome.route
    ) {
        composable(route = AppScreen.Welcome.FirstSteps.route) {
            FirstStepScreen(navController)
        }

        composable(
            route = AppScreen.Welcome.Gretting.route,
            arguments = AppScreen.Welcome.Gretting.arguments
        ) { backStackEntry ->
            val name = backStackEntry.arguments?.getString("name") ?: ""
            GrettingScreen(
                name = name,
                navController = navController
            )
        }
    }
}