"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetAutoDetectModel = exports.GetModelSpec = exports.ALL_MODEL_CHOICES = exports.ALL_MODELS = exports.MODEL_AUTO_DETECT = void 0;
const atem_connection_1 = require("atem-connection");
exports.MODEL_AUTO_DETECT = 0;
exports.ALL_MODELS = [
    {
        id: exports.MODEL_AUTO_DETECT,
        label: 'Auto Detect',
        inputs: 8,
        auxes: 3,
        MEs: 1,
        USKs: 1,
        DSKs: 2,
        MVs: 1,
        multiviewerFullGrid: false,
        SSrc: 1,
        macros: 100,
        media: {
            players: 2,
            stills: 20,
            clips: 0
        }
    },
    {
        id: atem_connection_1.Enums.Model.TVS,
        label: 'TV Studio',
        inputs: 8,
        auxes: 1,
        MEs: 1,
        USKs: 1,
        DSKs: 2,
        MVs: 1,
        multiviewerFullGrid: false,
        SSrc: 0,
        macros: 100,
        media: {
            players: 2,
            stills: 20,
            clips: 0
        }
    },
    {
        id: atem_connection_1.Enums.Model.OneME,
        label: '1 ME Production',
        inputs: 8,
        auxes: 3,
        MEs: 1,
        USKs: 4,
        DSKs: 2,
        MVs: 1,
        multiviewerFullGrid: false,
        SSrc: 1,
        macros: 100,
        media: {
            players: 2,
            stills: 32,
            clips: 2
        }
    },
    {
        id: atem_connection_1.Enums.Model.TwoME,
        label: '2 ME Production',
        inputs: 16,
        auxes: 6,
        MEs: 2,
        USKs: 2,
        DSKs: 2,
        MVs: 2,
        multiviewerFullGrid: false,
        SSrc: 1,
        macros: 100,
        media: {
            players: 2,
            stills: 32,
            clips: 2
        }
    },
    {
        id: atem_connection_1.Enums.Model.PS4K,
        label: 'Production Studio 4K',
        inputs: 8,
        auxes: 1,
        MEs: 1,
        USKs: 1,
        DSKs: 2,
        MVs: 1,
        multiviewerFullGrid: false,
        SSrc: 0,
        macros: 100,
        media: {
            players: 2,
            stills: 20,
            clips: 0
        }
    },
    {
        id: atem_connection_1.Enums.Model.OneME4K,
        label: '1 ME Production 4K',
        inputs: 10,
        auxes: 3,
        MEs: 1,
        USKs: 4,
        DSKs: 2,
        MVs: 1,
        multiviewerFullGrid: false,
        SSrc: 1,
        macros: 100,
        media: {
            players: 2,
            stills: 32,
            clips: 2
        }
    },
    {
        id: atem_connection_1.Enums.Model.TwoME4K,
        label: '2 ME Production 4K',
        inputs: 20,
        auxes: 6,
        MEs: 2,
        USKs: 2,
        DSKs: 2,
        MVs: 2,
        multiviewerFullGrid: false,
        SSrc: 1,
        macros: 100,
        media: {
            players: 2,
            stills: 32,
            clips: 2
        }
    },
    {
        id: atem_connection_1.Enums.Model.TwoMEBS4K,
        label: '4 ME Broadcast 4K',
        inputs: 20,
        auxes: 6,
        MEs: 4,
        USKs: 4,
        DSKs: 2,
        MVs: 2,
        multiviewerFullGrid: false,
        SSrc: 1,
        macros: 100,
        media: {
            players: 4,
            stills: 64,
            clips: 2
        }
    },
    {
        id: atem_connection_1.Enums.Model.TVSHD,
        label: 'TV Studio HD',
        inputs: 8,
        auxes: 1,
        MEs: 1,
        USKs: 1,
        DSKs: 2,
        MVs: 1,
        multiviewerFullGrid: false,
        SSrc: 0,
        macros: 100,
        media: {
            players: 2,
            stills: 20,
            clips: 0
        }
    },
    {
        id: atem_connection_1.Enums.Model.Constellation,
        label: 'Constellation',
        inputs: 40,
        auxes: 24,
        MEs: 4,
        USKs: 4,
        DSKs: 4,
        MVs: 4,
        multiviewerFullGrid: true,
        SSrc: 2,
        macros: 100,
        media: {
            players: 4,
            stills: 64,
            clips: 4
        }
    },
    {
        id: atem_connection_1.Enums.Model.Constellation8K,
        label: 'Constellation 8K',
        inputs: 10,
        auxes: 6,
        MEs: 1,
        USKs: 4,
        DSKs: 2,
        MVs: 1,
        multiviewerFullGrid: true,
        SSrc: 1,
        macros: 100,
        media: {
            players: 1,
            stills: 24,
            clips: 2
        }
    }
];
exports.ALL_MODEL_CHOICES = exports.ALL_MODELS.map(({ id, label }) => ({ id, label }));
exports.ALL_MODEL_CHOICES.sort((a, b) => {
    const aStr = a.label.toLowerCase();
    const bStr = b.label.toLowerCase();
    if (a.id === exports.MODEL_AUTO_DETECT) {
        return -1;
    }
    if (b.id === exports.MODEL_AUTO_DETECT) {
        return 1;
    }
    if (aStr < bStr) {
        return -1;
    }
    if (aStr > bStr) {
        return 1;
    }
    return 0;
});
function GetModelSpec(id) {
    return exports.ALL_MODELS.find(m => m.id === id);
}
exports.GetModelSpec = GetModelSpec;
function GetAutoDetectModel() {
    return exports.ALL_MODELS[0];
}
exports.GetAutoDetectModel = GetAutoDetectModel;
// export function GetParsedModelSpec ({ info, macro, media, inputs, settings, video }: AtemState): ModelSpec {
//     return {
//         id: info.model,
//         label: info.productIdentifier,
//         inputs: inputs.filter(i => i.isExternal).length,
//         auxes: info.capabilities.auxilliaries,
//         MEs: info.capabilities.MEs,
//         USKs: video.ME[0] ? _.values(video.ME[0].upstreamKeyers).length : 0,
//         DSKs: _.values(video.downstreamKeyers).length,
//         MVs: _.values(settings.multiViewers).length,
//         multiviewerFullGrid: false, // TODO
//         SSrc: info.capabilities.superSources,
//         macros: macro.macroProperties.length,
//         media: {
//             players: info.capabilities.mediaPlayers,
//             stills: media.stillPool.length,
//             clips: media.clipPool.length
//         }
//     }
// }
//# sourceMappingURL=AtemModels.js.map