use crate::Route;
use dioxus::prelude::*;

use super::icons;

#[component]
pub fn Topbar() -> Element {
    rsx! {
        div {
            class: "navbar bg-base-200 px-3",
            div {
                class: "flex-1",
                span { class: "text-xl font-bold", "WRB" }
            }
            div {
                class: "flex-none gap-2",
                Link {
                    class: "btn btn-ghost font-normal",
                    to: Route::Home {},
                    "Administration"
                }
                Link {
                    class: "btn btn-square btn-ghost",
                    to: Route::Settings {},
                    icons::Cog {}
                }
            }
        }
    }
}
