import { User } from "@/src/types";
import { TWUI_LINK_LIST_LINK_OBJECT } from "@/twui/components/elements/LinkList";

type Params = { user?: User };

export function AdminAsideLinks({ user }: Params) {
    const links: (
        | TWUI_LINK_LIST_LINK_OBJECT
        | TWUI_LINK_LIST_LINK_OBJECT[]
        | undefined
    )[] = [
        {
            title: "Dashboard",
            url: "/admin",
            strict: true,
        },
        {
            title: "Services",
            url: "/admin/services",
        },
        user?.super_admin
            ? {
                  title: "Users",
                  url: "/admin/users",
              }
            : undefined,
        {
            title: "Settings",
            url: "/admin/settings",
        },
    ];

    return links;
}
