"use client"

import NavLink, {clientNavLinks, patientNavLinks} from "@/components/Application/Common/NavBarNavigation/NavBarContent/NavLink";
import {Models} from "appwrite";


type NavBarContentPropsType = {
    user: Models.User<any> | null;
}

export default function NavBarContent(props: NavBarContentPropsType) {

    // todo missing implementation
    let mainNavLinks = clientNavLinks;
    if (!props?.user) { // todo missing implementation
        // if the currently logged in user is a patient, show the patient nav bar content
        mainNavLinks = patientNavLinks
    }

    return (
        <div className="grow w-full">
            <nav aria-label="Main navigation">
                <ul className="flex md:block justify-between items-center">

                    {/* main nav links */}
                    {
                        mainNavLinks.map((navLink, index) => {
                            return (
                                <li key={index}>
                                    <NavLink {...navLink}/>
                                </li>
                            );
                        })
                    }
                </ul>
            </nav>
        </div>
    )
}