package api

import (
	"wucher/internal/config"
	"wucher/internal/service"
	"wucher/internal/transport/http/handlers"
)

func buildRouteDependenciesForTest() RouteDependencies {
	authSvc := service.NewAuthService(nil, nil, nil, nil, service.AuthServiceDependencies{SSO: nil, Protector: nil, Config: config.AuthConfig{}})
	return RouteDependencies{
		Handlers: RouteHandlers{
			User:                     handlers.NewUserHandler(service.NewUserService(nil)),
			Contact:                  handlers.NewContactHandler(service.NewContactService(nil, nil), nil),
			Health:                   handlers.NewHealthHandler(),
			BuildInfo:                handlers.NewBuildInfoHandler(),
			Auth:                     handlers.NewAuthHandler(authSvc),
			Role:                     handlers.NewRoleHandler(service.NewRoleService(nil)),
			Helicopter:               handlers.NewHelicopterHandler(service.NewHelicopterService(nil)),
			HelicopterUsage:          handlers.NewHelicopterUsageHandler(service.NewHelicopterUsageService(nil)),
			HelicopterFile:           handlers.NewHelicopterFileHandler(service.NewHelicopterFileService(nil)),
			Flight:                   handlers.NewFlightHandler(service.NewFlightService(nil)).WithMissionService(service.NewMissionService(nil)),
			FMReport:                 handlers.NewFMReportHandler(service.NewFMReportService(nil)).WithTakeoverService(service.NewTakeoverService(nil)).WithHelicopterUsageService(service.NewHelicopterUsageService(nil)),
			ReserveAc:                handlers.NewReserveAcHandler(service.NewReserveAcService(nil)),
			Facility:                 handlers.NewFacilityHandler(service.NewFacilityService(nil)),
			Base:                     handlers.NewBaseHandler(service.NewBaseService(nil)),
			Medicine:                 handlers.NewMedicineHandler(service.NewMedicineService(nil)),
			Vocation:                 handlers.NewVocationHandler(service.NewVocationService(nil)),
			Opc:                      handlers.NewOpcHandler(service.NewOpcService(nil)),
			ForcesPresent:            handlers.NewForcesPresentHandler(service.NewForcesPresentService(nil)),
			Hospital:                 handlers.NewHospitalHandler(service.NewHospitalService(nil)),
			HealthInsuranceCompanies: handlers.NewHealthInsuranceCompaniesHandler(service.NewHealthInsuranceCompaniesService(nil)),
			FederalState:             handlers.NewFederalStateHandler(service.NewFederalStateService(nil)),
			ICAO:                     handlers.NewICAOHandler(service.NewICAOService(nil)),
			Land:                     handlers.NewLandHandler(service.NewLandService(nil)),
			MasterSettings:           handlers.NewMasterSettingsHandler(service.NewMasterSettingsService(nil, service.MasterSettingsServiceDependencies{}), service.NewFileManagerService(nil, nil, nil, service.FileManagerServiceDependencies{}), nil),
			Branding:                 handlers.NewBrandingHandler(service.NewMasterSettingsService(nil, service.MasterSettingsServiceDependencies{}), service.NewFileManagerService(nil, nil, nil, service.FileManagerServiceDependencies{}), nil),
			FileManagerFolder:        handlers.NewFileManagerFolderHandler(service.NewFileManagerService(nil, nil, nil, service.FileManagerServiceDependencies{}), nil),
			FileManagerFile: handlers.NewFileManagerFileHandler(service.NewFileManagerService(nil, nil, nil, service.FileManagerServiceDependencies{}), nil).
				WithAircraftService(service.NewHelicopterService(nil)).
				WithBaseService(service.NewBaseService(nil)).
				WithTakeoverService(service.NewTakeoverService(nil)),
			FileManagerAttachment: handlers.NewFileManagerAttachmentHandler(service.NewFileManagerService(nil, nil, nil, service.FileManagerServiceDependencies{})),
			FileManagerEvents:     handlers.NewFileManagerEventsHandler(nil),
			DutyRoster:            handlers.NewDutyRosterHandler(service.NewDutyRosterService(nil)),
			AirRescuerChecklist:   handlers.NewAirRescuerChecklistHandler(service.NewAirRescuerChecklistService(nil)),
			InsurancePatientData:  handlers.NewInsurancePatientDataHandler(service.NewInsurancePatientDataService(nil)),
			PatientData:           handlers.NewPatientDataHandler(service.NewPatientDataService(nil)),
			HEMSOperationalData:   handlers.NewHEMSOperationalDataHandler(service.NewHEMSOperationalDataService(nil)),
			HEMSOperationCategory: handlers.NewHEMSOperationCategoryHandler(service.NewHEMSOperationCategoryService(nil)),
			HEMSOperation:         handlers.NewHEMSOperationHandler(service.NewHEMSOperationService(nil)),
		},
		Services: RouteServices{
			Auth:  authSvc,
			Audit: service.NewAuditLogService(nil, service.AuditLogServiceDependencies{QueueSize: 0, Workers: 0, IPEncryptionKey: ""}),
		},
	}
}
