use axum::{Router, routing::get};
use tower_http::services::ServeDir;
use super::handlers::{api_config_handler, health_check, root_handler, static_handler};
use crate::data::AppState;
pub fn create_routes(state: AppState) -> Router {
Router::new()
.route("/", get(root_handler))
.route("/api/config", get(api_config_handler))
.route("/api/health", get(health_check))
.nest_service("/static", ServeDir::new("web/static"))
.fallback(get(static_handler))
.with_state(state)
}