"use strict";
/**
 * Copyright: (c) Myia SAS 2026.
 * This file and its contents are licensed under the AGPLv3 License.
 * Please see the LICENSE file at the root of this repository
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.createPlaywrightImportRewriter = createPlaywrightImportRewriter;
const PLAYWRIGHT_IMPORT_SOURCE = '@playwright/test';
const REPLACEMENT_SOURCE = '@heal-dev/heal-playwright-tracer';
function createPlaywrightImportRewriter(t) {
    return function rewritePlaywrightImports(program) {
        for (const node of program.body) {
            if (t.isImportDeclaration(node) &&
                node.source &&
                node.source.value === PLAYWRIGHT_IMPORT_SOURCE) {
                node.source = t.stringLiteral(REPLACEMENT_SOURCE);
            }
        }
    };
}
