package com.example.tomatoandpotatoapp.navigationPack

import androidx.compose.runtime.Composable
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.example.tomatoandpotatoapp.Screens.Authorization
import com.example.tomatoandpotatoapp.Screens.ChoiceScr
import com.example.tomatoandpotatoapp.Screens.MyProfile
import com.example.tomatoandpotatoapp.Screens.Registration
import com.example.tomatoandpotatoapp.Screens.ShowPlants
import com.example.tomatoandpotatoapp.Screens.Welcome
import com.example.tomatoandpotatoapp.ViewModelsPack.SupabaseAuthViewModel

@Composable

fun Navigation(viewModel: SupabaseAuthViewModel) {
    val navController = rememberNavController()
    NavHost(
        navController = navController,
        startDestination = Screens.StartScreen.route
    ) {
        composable(route = Screens.StartScreen.route) {
            Welcome(navController)
        }
        composable(route = Screens.ChoiceScreen.route) {
            ChoiceScr(navController)
        }
        composable(route = Screens.AuthorizationScreen.route  ) {
            Authorization(viewModel,navController)
        }
        composable(route = Screens.RegistrationScreen.route) {
            Registration(viewModel,navController)
        }
//        composable(route = Screens.AppNavigation.route)
//        {
//            //AppNavigation(viewModel)
//        }
        composable(route = Screens.ProfileScreen.route) {
            MyProfile(viewModel,navController)
        }
        composable(route = Screens.PlantsCatalogScreen.route) {
            ShowPlants(viewModel,navController)
        }
    }

}