// Fusion Accounting - Bank Statement Import Model
// Copyright (C) 2026 Nexa Systems Inc.

import { BaseImportModel } from "@base_import/import_model";
import { patch } from "@web/core/utils/patch";
import { _t } from "@web/core/l10n/translation";

/**
 * Patches BaseImportModel to add a bank statement CSV import template
 * when importing account.bank.statement records.
 */
patch(BaseImportModel.prototype, {
    async init() {
        await super.init(...arguments);

        if (this.resModel === "account.bank.statement") {
            this.importTemplates.push({
                label: _t("Import Template for Bank Statements"),
                template: "/fusion_accounting/static/csv/account.bank.statement2.csv",
            });
        }
    }
});
