/** @odoo-module **/

import { patch } from '@web/core/utils/patch';
import { useService } from '@web/core/utils/hooks';
import { useRef } from '@odoo/owl';

import { NavBar } from '@web/webclient/navbar/navbar';
import { AppSwitcher } from "@fusion_backend_theme/webclient/app_switcher/app_switcher";

patch(NavBar.prototype, {
    setup() {
        super.setup();
        this.appMenuService = useService('app_menu');
        this.navRef = useRef("nav");
    },
});

patch(NavBar, {
    components: {
        ...NavBar.components,
        AppSwitcher,
    },
});
