"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlatformsDataService = void 0;
const yok_1 = require("../common/yok");
const _ = require("lodash");
class PlatformsDataService {
    constructor($options, $androidProjectService, $iOSProjectService) {
        this.$options = $options;
        this.platformsDataService = {};
        this.platformsDataService = {
            ios: $iOSProjectService,
            android: $androidProjectService,
            visionos: $iOSProjectService,
        };
    }
    getPlatformData(platform, projectData) {
        var _a;
        var _b;
        const platformKey = platform && _.first(platform.toLowerCase().split("@"));
        let platformData;
        if (platformKey) {
            (_a = (_b = this.$options).platformOverride) !== null && _a !== void 0 ? _a : (_b.platformOverride = platform);
            platformData =
                this.platformsDataService[platformKey] &&
                    this.platformsDataService[platformKey].getPlatformData(projectData);
        }
        return platformData;
    }
}
exports.PlatformsDataService = PlatformsDataService;
yok_1.injector.register("platformsDataService", PlatformsDataService);
//# sourceMappingURL=platforms-data-service.js.map