import {ContainerModule}from'inversify';import {SERVER_TYPES}from'common/server';import {CountriesAndCitiesMigration}from'../migrations/countries-and-cities-migration.js';import {CityService}from'../services/city-service.js';import {CountryService}from'../services/country-service.js';import {StateService}from'../services/state-service.js';import {CityDataLoader}from'../dataloaders/city-data-loader.js';import {CountryDataLoader}from'../dataloaders/country-data-loader.js';import {StateDataLoader}from'../dataloaders/state-data-loader.js';import {CityRepository}from'../store/repositories/city-repository.js';import {CountryRepository}from'../store/repositories/country-repository.js';import {StateRepository}from'../store/repositories/state-repository.js';/**
 * Local services and exposed micro services to serve remote connections.
 * Operates within in the Gateway.
 *
 */
const DataloaderContainerModule = () => new ContainerModule(bind => {
  bind(SERVER_TYPES.CountryDataLoader).to(CountryDataLoader).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.StateDataLoader).to(StateDataLoader).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.CityDataLoader).to(CityDataLoader).inSingletonScope().whenTargetIsDefault();
});
const MigrationContainerModule = () => new ContainerModule(bind => {
  bind('MongodbMigration').to(CountriesAndCitiesMigration).whenTargetNamed(CountriesAndCitiesMigration.name);
  bind(SERVER_TYPES.CityRepository).to(CityRepository).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.StateRepository).to(StateRepository).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.CountryRepository).to(CountryRepository).inSingletonScope().whenTargetIsDefault();
});
const DBServiceContainerModule = () => new ContainerModule(bind => {
  bind(SERVER_TYPES.CityRepository).to(CityRepository).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.CityService).to(CityService).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.StateRepository).to(StateRepository).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.StateService).to(StateService).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.CountryRepository).to(CountryRepository).inSingletonScope().whenTargetIsDefault();
  bind(SERVER_TYPES.CountryService).to(CountryService).inSingletonScope().whenTargetIsDefault();
});export{DBServiceContainerModule,DataloaderContainerModule,MigrationContainerModule};//# sourceMappingURL=containers.js.map
