"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OgPidContainer = void 0;
const JISInfotextsRedisRepository_1 = require("../../jis/data-access/cache/JISInfotextsRedisRepository");
const PublicVehiclePositionsRepository_1 = require("../../public/data-access/redis/PublicVehiclePositionsRepository");
const CisStopGroupRepository_1 = require("../../ropid-gtfs/data-access/CisStopGroupRepository");
const RunTripsRedisRepository_1 = require("../../ropid-gtfs/data-access/redis/RunTripsRedisRepository");
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
const V3DeparturesPresetController_1 = require("../controllers/v3/V3DeparturesPresetController");
const V3InfotextsController_1 = require("../controllers/v3/V3InfotextsController");
const V3TransferBoardsController_1 = require("../controllers/v3/V3TransferBoardsController");
const V4TransferBoardsController_1 = require("../controllers/v4/V4TransferBoardsController");
const data_access_1 = require("../data-access");
const JISInfotextRepository_1 = require("../data-access/JISInfotextRepository");
const JISInfotextRopidGTFSStopsRepository_1 = require("../data-access/JISInfotextRopidGTFSStopsRepository");
const RopidDeparturesPresetRepository_1 = require("../data-access/RopidDeparturesPresetRepository");
const RopidDeparturesPresetsRopidGTFSStopsRepository_1 = require("../data-access/RopidDeparturesPresetsRopidGTFSStopsRepository");
const JISInfotextStopSuppressionFilter_1 = require("../helpers/JISInfotextStopSuppressionFilter");
const InfotextFacade_1 = require("../service/facade/InfotextFacade");
const RopidDeparturesPresetFacade_1 = require("../service/facade/RopidDeparturesPresetFacade");
const StopFacade_1 = require("../service/facade/StopFacade");
const TransferFacade_1 = require("../service/facade/TransferFacade");
const JISInfotextDepartureTransformation_1 = require("../service/transformations/JISInfotextDepartureTransformation");
const JISInfotextOverviewTransformation_1 = require("../service/transformations/JISInfotextOverviewTransformation");
const JISInfotextTransferTransformation_1 = require("../service/transformations/JISInfotextTransferTransformation");
const RopidDeparturesPresetTransformation_1 = require("../service/transformations/RopidDeparturesPresetTransformation");
const TransferDepartureTransformation_1 = require("../service/transformations/TransferDepartureTransformation");
const OgPidToken_1 = require("./OgPidToken");
const GtfsStopsRedisRepository_1 = require("../../ropid-gtfs/data-access/redis/GtfsStopsRedisRepository");
const VPSubscriber_1 = require("../../shared/service/VPSubscriber");
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
const const_1 = require("../../../schema-definitions/ropid-gtfs/redis/const");
const const_2 = require("../../../schema-definitions/jis/redis/const");
const PublicGtfsDepartureRepository_1 = require("../../public/data-access/redis/PublicGtfsDepartureRepository");
const VehicleDescriptorCachedRepository_1 = require("../../public/data-access/VehicleDescriptorCachedRepository");
const PublicStopTimeRepository_1 = require("../../public/data-access/redis/PublicStopTimeRepository");
const DelayComputationRepository_1 = require("../../public/data-access/redis/DelayComputationRepository");
const const_3 = require("../../../schema-definitions/vehicle-positions/redis/const");
const JISInfotextCacheTransferTransformation_1 = require("../service/transformations/JISInfotextCacheTransferTransformation");
const TransferDepartureCacheTransformation_1 = require("../service/transformations/TransferDepartureCacheTransformation");
const ogPidContainer = ioc_1.OutputGatewayContainer.createChildContainer();
exports.OgPidContainer = ogPidContainer;
//#region Repositories
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.CisStopGroupRepository, CisStopGroupRepository_1.CisStopGroupRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRopidGTFSStopsRepository, JISInfotextRopidGTFSStopsRepository_1.JISInfotextRopidGTFSStopsRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRepository, JISInfotextRepository_1.JISInfotextRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.DeparturesRepository, data_access_1.DeparturesRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RunTripsRedisRepository, RunTripsRedisRepository_1.RunTripsRedisRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.PublicVehiclePositionsRepository, PublicVehiclePositionsRepository_1.PublicVehiclePositionsRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetRepository, RopidDeparturesPresetRepository_1.RopidDeparturesPresetRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetsRopidGTFSStopsRepository, RopidDeparturesPresetsRopidGTFSStopsRepository_1.RopidDeparturesPresetsRopidGTFSStopsRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.GtfsStopsRedisRepository, GtfsStopsRedisRepository_1.GtfsStopsRedisRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextsRedisRepository, JISInfotextsRedisRepository_1.JISInfotextsRedisRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.PublicGtfsDepartureRepository, PublicGtfsDepartureRepository_1.PublicGtfsDepartureRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.VehicleDescriptorCachedRepository, VehicleDescriptorCachedRepository_1.VehicleDescriptorCachedRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.PublicStopTimeRepository, PublicStopTimeRepository_1.PublicStopTimeRepository);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.DelayComputationRepository, DelayComputationRepository_1.DelayComputationRepository);
//#endregion
//#region Transformations
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextDepartureTransformation, JISInfotextDepartureTransformation_1.JISInfotextDepartureTransformation);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextTransferTransformation, JISInfotextTransferTransformation_1.JISInfotextTransferTransformation);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextOverviewTransformation, JISInfotextOverviewTransformation_1.JISInfotextOverviewTransformation);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.TransferDepartureTransformation, TransferDepartureTransformation_1.TransferDepartureTransformation);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetTransformation, RopidDeparturesPresetTransformation_1.RopidDeparturesPresetTransformation);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextCacheTransferTransformation, JISInfotextCacheTransferTransformation_1.JISInfotextCacheTransferTransformation);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.TransferDepartureCacheTransformation, TransferDepartureCacheTransformation_1.TransferDepartureCacheTransformation);
//#endregion
//#region Facade
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.StopFacade, StopFacade_1.StopFacade);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.InfotextFacade, InfotextFacade_1.InfotextFacade);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.TransferFacade, TransferFacade_1.TransferFacade);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetFacade, RopidDeparturesPresetFacade_1.RopidDeparturesPresetFacade);
//#endregion
//#region Controllers
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3TransferBoardsController, V3TransferBoardsController_1.V3TransferBoardsController);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3InfotextsController, V3InfotextsController_1.V3InfotextsController);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3RopidDeparturesPresetController, V3DeparturesPresetController_1.V3RopidDeparturesPresetController);
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V4TransferBoardsController, V4TransferBoardsController_1.V4TransferBoardsController);
//#endregion
//#region Helpers
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextStopSuppressionFilter, JISInfotextStopSuppressionFilter_1.JISInfotextStopSuppressionFilter);
//#endregion
ogPidContainer.register(OgPidToken_1.OgPidToken.GtfsStopsSubscriber, {
    useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
        const config = c.resolve(CoreToken_1.CoreToken.SimpleConfig);
        const logger = c.resolve(CoreToken_1.CoreToken.Logger);
        return new VPSubscriber_1.VPSubscriber({
            channelName: const_1.GTFS_STOPS_NAMESPACE_PREFIX,
            redisConnectionString: config.getValue("env.REDIS_CONN"),
            logger: logger,
        }, c.resolve(OgPidToken_1.OgPidToken.GtfsStopsRedisRepository));
    }),
});
ogPidContainer.register(OgPidToken_1.OgPidToken.JisInfotextsSubscriber, {
    useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
        const config = c.resolve(CoreToken_1.CoreToken.SimpleConfig);
        const logger = c.resolve(CoreToken_1.CoreToken.Logger);
        return new VPSubscriber_1.VPSubscriber({
            channelName: const_2.JIS_NAMESPACE_PREFIX,
            redisConnectionString: config.getValue("env.REDIS_CONN"),
            logger: logger,
        }, c.resolve(OgPidToken_1.OgPidToken.JISInfotextsRedisRepository));
    }),
});
ogPidContainer.register(OgPidToken_1.OgPidToken.VPSubscriber, {
    useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
        const config = c.resolve(CoreToken_1.CoreToken.SimpleConfig);
        const logger = c.resolve(CoreToken_1.CoreToken.Logger);
        return new VPSubscriber_1.VPSubscriber({
            channelName: const_3.PUBLIC_CACHE_NAMESPACE_PREFIX,
            redisConnectionString: config.getValue("env.REDIS_CONN"),
            logger: logger,
        }, c.resolve(OgPidToken_1.OgPidToken.PublicVehiclePositionsRepository));
    }),
});
//# sourceMappingURL=Di.js.map