use std::sync::Arc;

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

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

pub fn router() -> Router<Arc<AppState>> {
    Router::new()
        .route("/", get(get_notification_config))
        .route("/", put(update_notification_config))
        .route("/test/discord", post(test_discord))
        .route("/test/pushbullet", post(test_pushbullet))
}

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

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

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

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