use std::sync::Arc;

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

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

pub fn router() -> Router<Arc<AppState>> {
    Router::new()
        .route("/config", get(get_store_config))
        .route("/config", put(update_store_config))
        .route("/categories", get(list_categories))
        .route("/categories", post(create_category))
        .route("/categories/{id}", put(update_category))
        .route("/categories/{id}", delete(delete_category))
        .route("/items", get(list_items))
        .route("/items", post(create_item))
        .route("/items/{id}", put(update_item))
        .route("/items/{id}", delete(delete_item))
        .route("/transactions", get(list_transactions))
        .route("/webhook/paypal", post(paypal_webhook))
}

async fn get_store_config() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn update_store_config() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn list_categories() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn create_category() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn update_category() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn delete_category() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn list_items() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn create_item() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn update_item() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn delete_item() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn list_transactions() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}

async fn paypal_webhook() -> ApiResult<impl axum::response::IntoResponse> {
    todo!()
}
