"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatsData = void 0;
exports.unionToStatsData = unionToStatsData;
exports.unionListToStatsData = unionListToStatsData;
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
const base_stats_1 = require("../../fbs/rtp-stream/base-stats");
const recv_stats_1 = require("../../fbs/rtp-stream/recv-stats");
const send_stats_1 = require("../../fbs/rtp-stream/send-stats");
var StatsData;
(function (StatsData) {
    StatsData[StatsData["NONE"] = 0] = "NONE";
    StatsData[StatsData["BaseStats"] = 1] = "BaseStats";
    StatsData[StatsData["RecvStats"] = 2] = "RecvStats";
    StatsData[StatsData["SendStats"] = 3] = "SendStats";
})(StatsData || (exports.StatsData = StatsData = {}));
function unionToStatsData(type, accessor) {
    switch (StatsData[type]) {
        case 'NONE': return null;
        case 'BaseStats': return accessor(new base_stats_1.BaseStats());
        case 'RecvStats': return accessor(new recv_stats_1.RecvStats());
        case 'SendStats': return accessor(new send_stats_1.SendStats());
        default: return null;
    }
}
function unionListToStatsData(type, accessor, index) {
    switch (StatsData[type]) {
        case 'NONE': return null;
        case 'BaseStats': return accessor(index, new base_stats_1.BaseStats());
        case 'RecvStats': return accessor(index, new recv_stats_1.RecvStats());
        case 'SendStats': return accessor(index, new send_stats_1.SendStats());
        default: return null;
    }
}
