/** @odoo-module **/
import * as viewHookModule from "@web/views/view_hook";
import { patch } from "@web/core/utils/patch";
import { useComponent } from "@odoo/owl";
import { useTranslateCategory } from "@translation_helper/translate/translate_context";

const originalUseSetupView = viewHookModule.useSetupView;

patch(viewHookModule, {
    useSetupView(params) {
        useTranslateCategory("view", { component: useComponent() });
        return originalUseSetupView(params);
    },
});
