use yew::prelude::{function_component, html, Html};

mod navbar;
mod text;

use navbar::NavbarElemProps;

#[function_component]
fn App() -> Html {
    let elements = vec![
        NavbarElemProps {
            icon: "fa-solid fa-key".to_string(),
            tooltip: "PGP Key".to_string(),
            link: "https://keyoxide.org/58D7A3458C36566E2088A04ADE3060396884D3F2".to_string(),
            spacer: false,
        },
        NavbarElemProps {
            icon: "".to_string(),
            tooltip: "PGP Key".to_string(),
            link: "".to_string(),
            spacer: true,
        },
        NavbarElemProps {
            icon: "fa-brands fa-mastodon".to_string(),
            tooltip: "Fedi".to_string(),
            link: "https://kolektiva.social/@vanten_s".to_string(),
            spacer: false,
        },
        NavbarElemProps {
            icon: "fa-solid fa-envelope".to_string(),
            tooltip: "Mail".to_string(),
            link: "mailto:vanten-s@vanten-s.com".to_string(),
            spacer: false,
        },
        NavbarElemProps {
            icon: "".to_string(),
            tooltip: "PGP Key".to_string(),
            link: "".to_string(),
            spacer: true,
        },
        NavbarElemProps {
            icon: "fa-brands fa-github".to_string(),
            tooltip: "GitHub".to_string(),
            link: "https://github.com/vanten-s/".to_string(),
            spacer: false,
        },
        NavbarElemProps {
            icon: "fa-brands fa-git-alt".to_string(),
            tooltip: "Forgejo".to_string(),
            link: "https://forgejo.vanten-s.com/".to_string(),
            spacer: false,
        },
        NavbarElemProps {
            icon: "fa-solid fa-rss".to_string(),
            tooltip: "Feed".to_string(),
            link: "https://www.vanten-s.com/rss.xml".to_string(),
            spacer: false,
        },
    ];

    html! {
        <>
        <navbar::Navbar {elements}/>
        <a rel="me" href="https://kolektiva.social/@vanten_s" class="h-0 w-0"></a>
        <div class="pl-20 pt-4">
        <h1>{ "Helu" }</h1>
        </div>
        </>
    }
}

fn main() {
    yew::Renderer::<App>::new().render();
}
