use std::sync::Arc;

use axum::{
    routing::get,
    Json, Router,
};

use crate::models::error::ApiResult;
use crate::AppState;

pub fn router() -> Router<Arc<AppState>> {
    Router::new()
        .route("/servers", get(list_public_servers))
        .route("/servers/{id}", get(get_public_server))
        .route("/servers/{id}/wipe-schedule", get(get_wipe_schedule))
        .route("/servers/{id}/countdown", get(get_countdown))
        .route("/servers/{id}/map", get(get_current_map))
        .route("/servers/{id}/players", get(get_players))
        .route("/servers/{id}/mods", get(get_mods))
        .route("/servers/{id}/motd", get(get_motd))
        .route("/servers/{id}/store", get(get_store))
}

async fn list_public_servers() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_public_server() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_wipe_schedule() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_countdown() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_current_map() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_players() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_mods() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_motd() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}

async fn get_store() -> ApiResult<Json<serde_json::Value>> {
    Ok(Json(serde_json::json!({"status": "not_implemented"})))
}
