/**
 * AppNavigation.kt
 * SkyLink Android - Navigation 扩展函数
 *
 * 提供优雅的 Navigation DSL 扩展，用于构建应用导航图
 *
 * @author flowzl
 * @date 2026-01-19
 */

package com.skylink.app.navigation

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.fragment.fragment
import com.skylink.app.ui.HomeFragment
import com.skylink.app.ui.SettingsFragment
import com.skylink.app.navigation.Routes

/**
 * 应用导航图构建器
 *
 * 使用方式：
 * val navController = findNavController()
 * navGraphBuilder.appNavGraph(navController)
 *
 * @param navController Navigation 控制器
 */
fun NavGraphBuilder.appNavGraph(navController: NavController) {
    // 首页面
    homeGraph(navController)
    
    // 设置页
    settingsGraph(navController)
}

private fun NavGraphBuilder.homeGraph(navController: NavController) {
    fragment<HomeFragment>(route = Routes.HOME) {
        // 首页导航参数
    }
}

private fun NavGraphBuilder.settingsGraph(navController: NavController) {
    fragment<SettingsFragment>(route = Routes.SETTINGS) {
        // 设置导航参数
    }
}
