import { asFunction, asValue } from "awilix";
import { IntegrationCredentials, IntegrationLog, IntegrationState, SyncExternalIdMapping } from "./data/entities.js";
import { createCredentialsService } from "./lib/credentials-service.js";
import { createIntegrationStateService } from "./lib/state-service.js";
import { createIntegrationLogService } from "./lib/log-service.js";
import { createHealthService } from "./lib/health-service.js";
function register(container) {
  container.register({
    integrationCredentialsService: asFunction(({ em }) => createCredentialsService(em)).scoped().proxy(),
    integrationStateService: asFunction(({ em }) => createIntegrationStateService(em)).scoped().proxy(),
    integrationLogService: asFunction(({ em }) => createIntegrationLogService(em)).scoped().proxy(),
    integrationHealthService: asFunction(
      ({ integrationStateService, integrationLogService }) => createHealthService(container, integrationStateService, integrationLogService)
    ).scoped().proxy(),
    SyncExternalIdMapping: asValue(SyncExternalIdMapping),
    IntegrationCredentials: asValue(IntegrationCredentials),
    IntegrationState: asValue(IntegrationState),
    IntegrationLog: asValue(IntegrationLog)
  });
}
export {
  register
};
//# sourceMappingURL=di.js.map
