export default cachedEventHandler(async (event) => {
    const { apiUrl } = useRuntimeConfig()
    const { lang } = getQuery(event)
    const menus: any = await $fetch(`${apiUrl}/negresco/acf/v3/options/menus-${lang}`)

    if (menus) {
        return {
            default_image: menus?.acf?.photo_defaut_menu_principal,
            primary_menu_header: menus?.acf?.choix_menu_principal,
            secondary_menu_header: menus?.acf?.choix_menu_principal_footer
        }
    }
}, {
    swr: true,
    maxAge: 3600,
    name: 'getMainMenu'
})
