import { useFetchJson } from "@/composable/useFetchJson";
import type { MenuItem, Route } from "@/types/menu";

export const getMenu = async () => {
    const resp = await useFetchJson<MenuItem>('/api/v1/restricted/menu/get-menu');

    return resp.items.children
    
}


export const getRoutes = async () => {
    const resp = await useFetchJson<Route[]>('/api/v1/public/menu/get-routes');

    return resp.items
    
}