"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasLightdashUserContextVariableReference = exports.getIntrinsicUserAttributeRegex = exports.getUserAttributeRegex = void 0;
const getUserAttributeRegex = () => /\$\{(?:lightdash|ld)\.(?:attribute|attributes|attr)\.(\w+)\}/g;
exports.getUserAttributeRegex = getUserAttributeRegex;
const getIntrinsicUserAttributeRegex = () => /\$\{(?:lightdash|ld)\.user\.(\w+)\}/g;
exports.getIntrinsicUserAttributeRegex = getIntrinsicUserAttributeRegex;
const hasLightdashUserContextVariableReference = (sql) => sql.match((0, exports.getUserAttributeRegex)()) !== null ||
    sql.match((0, exports.getIntrinsicUserAttributeRegex)()) !== null;
exports.hasLightdashUserContextVariableReference = hasLightdashUserContextVariableReference;
//# sourceMappingURL=lightdashSqlVariables.js.map