/*
    This file is part of jellything (https://codeberg.org/metamuffin/jellything)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2026 metamuffin <metamuffin.org>
*/
pub fn u_home() -> String {
    "/home".to_owned()
}
pub fn u_node_id(node: &str) -> String {
    format!("/n/{node}")
}
pub fn u_node_slug(node: &str) -> String {
    format!("/n/{node}")
}
pub fn u_node_slug_player(node: &str) -> String {
    format!("/n/{node}/player")
}
pub fn u_node_slug_player_time(node: &str, time: f64) -> String {
    format!("/n/{node}/player?t={time}")
}
pub fn u_node_image(node: &str, slot: &str, size: usize) -> String {
    format!("/n/{node}/image/{slot}?size={size}")
}
pub fn u_node_slug_watched(node: &str, state: &str) -> String {
    format!("/n/{node}/watched?state={state}")
}
pub fn u_node_slug_person_asset(node: &str, group: &str, index: usize, size: usize) -> String {
    format!("/n/{node}/person/{index}/asset?group={group}&size={size}")
}
pub fn u_node_slug_thumbnail(node: &str, time: f64, size: usize) -> String {
    format!("/n/{node}/thumbnail?t={time}&size={size}")
}
pub fn u_node_slug_update_rating(node: &str) -> String {
    format!("/n/{node}/update_rating")
}
pub fn u_node_slug_progress(node: &str, time: f64) -> String {
    format!("/n/{node}/progress?t={time}")
}
pub fn u_items() -> String {
    "/items".to_string()
}
pub fn u_items_filter(page: usize) -> String {
    // TODO
    format!("/items?page={page}")
}
pub fn u_admin_users() -> String {
    "/admin/users".to_string()
}
pub fn u_admin_user(name: &str) -> String {
    format!("/admin/user/{name}")
}
pub fn u_admin_user_permission(name: &str) -> String {
    format!("/admin/user/{name}/update_permissions")
}
pub fn u_admin_user_remove(name: &str) -> String {
    format!("/admin/user/{name}/remove")
}
pub fn u_admin_log(warn_only: bool) -> String {
    format!("/admin/log?warn_only={warn_only}")
}
pub fn u_admin_invite_create() -> String {
    "/admin/generate_invite".to_string()
}
pub fn u_admin_invite_remove() -> String {
    "/admin/remove_invite".to_string()
}
pub fn u_admin_import() -> String {
    format!("/admin/import")
}
pub fn u_admin_import_post(incremental: bool) -> String {
    format!("/admin/import?incremental={incremental}")
}
pub fn u_admin_update_search() -> String {
    "/admin/update_search".to_string()
}
pub fn u_account_register() -> String {
    "/account/register".to_owned()
}
pub fn u_account_login() -> String {
    "/account/login".to_owned()
}
pub fn u_account_logout() -> String {
    "/account/logout".to_owned()
}
pub fn u_admin_dashboard() -> String {
    "/admin/dashboard".to_owned()
}
pub fn u_account_settings() -> String {
    "/account/settings".to_owned()
}
pub fn u_stats() -> String {
    "/stats".to_owned()
}
pub fn u_search() -> String {
    "/search".to_owned()
}
pub fn u_asset(token: &str, size: usize) -> String {
    format!("/asset/{token}?size={size}")
}
