"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.createPreprocessCallBuilder = createPreprocessCallBuilder;
function createPreprocessCallBuilder(t) {
    return function buildPreprocessCall(globalName, meta) {
        const callee = t.memberExpression(t.identifier('globalThis'), t.identifier(globalName));
        const call = t.optionalCallExpression(callee, [meta], /* optional */ true);
        const stmt = t.expressionStatement(t.awaitExpression(call));
        stmt._traced = true;
        return stmt;
    };
}
