/**
 * User Provisioning Framework — Startup Registration
 *
 * Registers all available service provisioners with the orchestrator.
 * Called during server startup.
 */

import { logger } from '../../utils/logger';
import { userProvisioningService } from './provisioning.service';
import { rocketchatProvisioner } from './rocketchat.provisioner';
import { giteaProvisioner } from './gitea.provisioner';
import { vaultwardenProvisioner } from './vaultwarden.provisioner';
import { listmonkProvisioner } from './listmonk.provisioner';

export function registerProvisioners(): void {
  userProvisioningService.register(rocketchatProvisioner);
  userProvisioningService.register(giteaProvisioner);
  userProvisioningService.register(vaultwardenProvisioner);
  userProvisioningService.register(listmonkProvisioner);

  logger.info(`User provisioning framework initialized (${userProvisioningService.getAll().length} provisioners)`);
}

export { userProvisioningService } from './provisioning.service';
