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

use crate::utils::auth::*;
use crate::utils::db_pool::{AppState, HotelPool};
use crate::utils::websocket::ws_handler;
use axum_extra::TypedHeader;
use headers::UserAgent;

// ROOTS
pub fn utils_routes() -> Router<AppState> {
    Router::new()
        .route("/login", put(clean_auth_loging))
        .route("/register", put(register_user))
        .route("/tokentest", put(token_tester))
        .route("/update_password", put(update_password))
        .route("/create_refresh", post(create_refresh_token))
        .route("/login_refresh_token", post(login_refresh_token))
        .route("/logout_single_device", post(logout_from_single_device))
        .route("/logout_all_devices", post(logout_from_all_devices))
        .route("/ws/{req_token}", get(ws_handler))
        .route("/force_update_password", put(force_update_password))
        .route("/get_hotels", get(get_hotel))
        .route("/add_hotel_user", put(add_hotel_user))

    //.with_state(state)
}
