"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FLOW_PARAMETER_NAME_PREFIX = exports.extractVariableNamesFromPattern = void 0;
const mablscriptFind_1 = require("@mablhq/test-model/mablscriptFind");
const extractVariableNamesFromPattern = (pattern = '') => (0, mablscriptFind_1.findVariables)(pattern)
    .filter((variableName) => variableName)
    .map((variableName) => {
    if (variableName.startsWith('web.') ||
        variableName.startsWith('user.') ||
        variableName.startsWith(exports.FLOW_PARAMETER_NAME_PREFIX)) {
        return variableName;
    }
    console.warn(`Found variable '${variableName}' without a namespace in pattern '${pattern}'`);
    return `user.${variableName}`;
});
exports.extractVariableNamesFromPattern = extractVariableNamesFromPattern;
exports.FLOW_PARAMETER_NAME_PREFIX = 'flow.';
