"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.get_api_version = void 0;
const constants_1 = require("./constants");
const FLAGON_NAME = 'facebook-capi-actions-canary-version';
const get_api_version = (features, statsContext) => {
    const statsClient = statsContext?.statsClient;
    const tags = statsContext?.tags;
    if (features && features[FLAGON_NAME]) {
        tags?.push(`version:${constants_1.CANARY_API_VERSION}`);
        statsClient?.incr(`fb_api_version`, 1, tags);
        return constants_1.CANARY_API_VERSION;
    }
    tags?.push(`version:${constants_1.API_VERSION}`);
    statsClient?.incr(`fb_api_version`, 1, tags);
    return constants_1.API_VERSION;
};
exports.get_api_version = get_api_version;
//# sourceMappingURL=utils.js.map