use axum::{
    response::IntoResponse,
    routing::{get, Router},
};

use super::templates::{
    BooksTemplate, HtmlTemplate, MonkAndRobotTemplate,
};

pub fn get_router() -> Router {
    Router::new()
        .route("/", get(books))
        .route("/monk&robot", get(monk_robot))
}

async fn books() -> impl IntoResponse {
    let books_page = BooksTemplate {};
    HtmlTemplate(books_page)
}

async fn monk_robot() -> impl IntoResponse {
    let monk_robot = MonkAndRobotTemplate {};
    HtmlTemplate(monk_robot)
}
