package com.zaojiao.app.feat.home.navigation


import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import com.zaojiao.app.feat.home.course.HomeCourseRoute
import com.zaojiao.app.feat.home.index.HomeIndexRoute
import com.zaojiao.app.feat.home.personal.HomePersonalRoute

const val homeIndex = "home/index"
const val homeCourse = "home/course"
const val homePersonal = "home/personal"

fun NavController.navigateToHomeIndex(navOptions: NavOptions? = null) {
    this.navigate(homeIndex, navOptions)
}

fun NavController.navigateToHomeCourse(navOptions: NavOptions? = null) {
    this.navigate(homeCourse, navOptions)
}

fun NavController.navigateToHomePersonal(navOptions: NavOptions? = null) {
    this.navigate(homePersonal, navOptions)
}

fun NavGraphBuilder.homeRoute() {
    composable(route = homeIndex) { HomeIndexRoute() }

    composable(route = homeCourse) { HomeCourseRoute() }

    composable(route = homePersonal) { HomePersonalRoute() }
}

