"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RopidGtfsContainer = void 0;
const Di_1 = require("../../ioc/Di");
const RopidDeparturesPresetsRopidGTFSStopsRepository_1 = require("../../jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository");
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
const pubsub_1 = require("@golemio/core/dist/integration-engine/data-access/pubsub");
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
const RopidGTFSStopsModel_1 = require("../RopidGTFSStopsModel");
const RopidGtfsFacade_1 = require("../RopidGtfsFacade");
const RopidGtfsMetadataRepository_1 = require("../RopidGtfsMetadataRepository");
const RopidGTFSRoutesRepository_1 = require("../data-access/RopidGTFSRoutesRepository");
const RopidGtfsRepository_1 = require("../data-access/RopidGtfsRepository");
const BlockStopsRedisRepository_1 = require("../data-access/cache/BlockStopsRedisRepository");
const PublicGtfsDepartureRepository_1 = require("../data-access/cache/PublicGtfsDepartureRepository");
const StaticFileRedisRepository_1 = require("../data-access/cache/StaticFileRedisRepository");
const precomputed_1 = require("../data-access/precomputed");
const StaticDataSourceFactory_1 = require("../datasources/StaticDataSourceFactory");
const DeparturesDirectionDataSourceProvider_1 = require("../datasources/static-data/DeparturesDirectionDataSourceProvider");
const MetroRailTrackDataSourceProvider_1 = require("../datasources/static-data/MetroRailTrackDataSourceProvider");
const DeparturePresetsFacade_1 = require("../facade/DeparturePresetsFacade");
const PublicDepartureCacheTransformation_1 = require("../transformations/PublicDepartureCacheTransformation");
const RopidGTFSTransformation_1 = require("../transformations/RopidGTFSTransformation");
const DeparturesPresetsDatasource_1 = require("../workers/presets/data-access/DeparturesPresetsDatasource");
const CheckForNewDeparturesPresetsTask_1 = require("../workers/presets/tasks/CheckForNewDeparturesPresetsTask");
const DownloadDeparturesPresetsTask_1 = require("../workers/presets/tasks/DownloadDeparturesPresetsTask");
const RefreshGtfsStopsCacheTask_1 = require("../workers/timetables/tasks/RefreshGtfsStopsCacheTask");
const RefreshPublicGtfsDepartureCacheTask_1 = require("../workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask");
const SaveStaticDataTask_1 = require("../workers/timetables/tasks/SaveStaticDataTask");
const DeparturesDirectionRepository_1 = require("../workers/timetables/tasks/data-access/DeparturesDirectionRepository");
const MetroRailtrackGPSRepository_1 = require("../workers/timetables/tasks/data-access/MetroRailtrackGPSRepository");
const PrecomputedTablesFacade_1 = require("../workers/timetables/tasks/helpers/PrecomputedTablesFacade");
const RopidGtfsFactory_1 = require("../workers/timetables/tasks/helpers/RopidGtfsFactory");
const DeparturesDirectionTransformation_1 = require("../workers/timetables/tasks/transformations/DeparturesDirectionTransformation");
const MetroRailtrackDataTransformation_1 = require("../workers/timetables/tasks/transformations/MetroRailtrackDataTransformation");
const RopidGtfsContainerToken_1 = require("./RopidGtfsContainerToken");
const GtfsStopsRedisRepository_1 = require("../workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository");
const RopidGTFSCisStopsModel_1 = require("../RopidGTFSCisStopsModel");
//#region Initialization
const RopidGtfsContainer = Di_1.PidContainer.createChildContainer();
exports.RopidGtfsContainer = RopidGtfsContainer;
//#endregion
//#region Datasources
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.BlockStopsRedisRepository, BlockStopsRedisRepository_1.BlockStopsRedisRepository);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturesPresetsDataSource, DeparturesPresetsDatasource_1.DeparturesPresetsDataSource);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.StaticDataSourceFactory, StaticDataSourceFactory_1.StaticDataSourceFactory);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.MetroRailTrackDataSourceProvider, MetroRailTrackDataSourceProvider_1.MetroRailTrackDataSourceProvider);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturesDirectionDataSourceProvider, DeparturesDirectionDataSourceProvider_1.DeparturesDirectionDataSourceProvider);
//#endregion
//#region Repositories
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.StaticFileRedisRepository, StaticFileRedisRepository_1.StaticFileRedisRepository).registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsRepository, RopidGtfsRepository_1.RopidGtfsRepository);
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsMetadataRepository, RopidGtfsMetadataRepository_1.RopidGtfsMetadataRepository);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGTFSRoutesRepository, RopidGTFSRoutesRepository_1.RopidGTFSRoutesRepository);
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DepartureRepository, precomputed_1.DeparturesRepository);
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PublicGtfsDepartureRepository, PublicGtfsDepartureRepository_1.PublicGtfsDepartureRepository);
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGTFSStopsModel, RopidGTFSStopsModel_1.RopidGTFSStopsModel);
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidDeparturesPresetsRopidGTFSStopsRepository, RopidDeparturesPresetsRopidGTFSStopsRepository_1.RopidDeparturesPresetsRopidGTFSStopsRepository);
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturesDirectionRepository, DeparturesDirectionRepository_1.DeparturesDirectionRepository);
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGTFSCisStopsModel, RopidGTFSCisStopsModel_1.RopidGTFSCisStopsModel);
//#endregion
//#region Transformations
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGTFSTransformation, RopidGTFSTransformation_1.RopidGTFSTransformation);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PublicDepartureCacheTransformation, PublicDepartureCacheTransformation_1.PublicDepartureCacheTransformation);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.MetroRailtrackDataTransformation, MetroRailtrackDataTransformation_1.MetroRailtrackDataTransformation);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.MetroRailtrackGPSRepository, MetroRailtrackGPSRepository_1.MetroRailtrackGPSRepository);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturesDirectionTransformation, DeparturesDirectionTransformation_1.DeparturesDirectionTransformation);
//#endregion
//#region Facade
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFacade, RopidGtfsFacade_1.RopidGtfsFacade);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PrecomputedTablesFacade, PrecomputedTablesFacade_1.PrecomputedTablesFacade)
    .register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory, RopidGtfsFactory_1.RopidGtfsFactory, { lifecycle: tsyringe_1.Lifecycle.Transient })
    .registerInstance(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RedisPubSubChannel, new pubsub_1.RedisPubSubChannel(ropid_gtfs_1.RopidGTFS.name));
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturePresetsFacade, DeparturePresetsFacade_1.DeparturePresetsFacade);
//#endregion
//#region Tasks
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RefreshGtfsStopsCacheTask, RefreshGtfsStopsCacheTask_1.RefreshGtfsStopsCacheTask);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RefreshPublicGtfsDepartureCacheTask, RefreshPublicGtfsDepartureCacheTask_1.RefreshPublicGtfsDepartureCacheTask);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DownloadDeparturesPresetsTask, DownloadDeparturesPresetsTask_1.DownloadDeparturesPresetsTask);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.CheckForNewDeparturesPresetsTask, CheckForNewDeparturesPresetsTask_1.CheckForNewDeparturesPresetsTask);
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.SaveStaticDataTask, SaveStaticDataTask_1.SaveStaticDataTask);
//#endregion
//#region Helpers
//#endregion
//#region Cache
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.GtfsStopsRedisRepository, GtfsStopsRedisRepository_1.GtfsStopsRedisRepository);
//# sourceMappingURL=Di.js.map