// Code generated by Wire. DO NOT EDIT.

//go:generate go run -mod=mod github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject

package main

import (
	"github.com/go-kratos/kratos/v3"
	"kra/internal/conf"
	"kra/internal/logging"
	"kra/internal/modules/system/biz"
	"kra/internal/modules/system/data"
	"kra/internal/modules/system/data/payment"
	"kra/internal/modules/system/data/repository"
	"kra/internal/modules/system/initialize"
	"kra/internal/modules/system/integration/cache"
	"kra/internal/modules/system/integration/email"
	"kra/internal/modules/system/integration/storage"
	"kra/internal/modules/system/service"
	"kra/internal/modules/system/transport/handler"
	"kra/internal/modules/system/transport/server"
	"kra/internal/modules/system/worker"
	"log/slog"
)

import (
	_ "go.uber.org/automaxprocs"
)

// Injectors from wire.go:

// wireApp init kratos application.
func wireApp(confServer *conf.Server, runtime *conf.Runtime, logger *slog.Logger, reloadableLogger *logging.ReloadableLogger, string2 string) (*kratos.App, func(), error) {
	reloadable, err := storage.NewFileStorage(runtime)
	if err != nil {
		return nil, nil, err
	}
	dataData, cleanup, err := data.NewData(runtime, logger, reloadable)
	if err != nil {
		return nil, nil, err
	}
	authorityAccessRepo := system.NewAuthorityAccessRepo(dataData)
	apiRepo := system.NewAPIRepo(dataData)
	accessControlUsecase := biz.NewAccessControlUsecase(authorityAccessRepo, apiRepo)
	accessControlService := service.NewAccessControlService(accessControlUsecase)
	authorityUsecase := biz.NewAuthorityUsecase(authorityAccessRepo)
	authorityService := service.NewAuthorityService(authorityUsecase)
	authority := handler.NewAuthority(authorityService)
	menuRepo := system.NewMenuRepo(dataData)
	menuUsecase := biz.NewMenuUsecase(menuRepo)
	menuService := service.NewMenuService(menuUsecase)
	menu := handler.NewMenu(menuService)
	apiUsecase := biz.NewAPIUsecase(apiRepo)
	runtimeSettings := system.NewRuntimeSettings(runtime)
	apiService := service.NewAPIService(apiUsecase, runtimeSettings)
	api := handler.NewAPI(apiService)
	permissionRepo := system.NewPermissionRepo(dataData)
	permissionUsecase := biz.NewPermissionUsecase(permissionRepo)
	permissionService := service.NewPermissionService(permissionUsecase)
	permission := handler.NewPermission(permissionService)
	departmentRepo := system.NewDepartmentRepo(dataData)
	departmentUsecase := biz.NewDepartmentUsecase(departmentRepo)
	departmentService := service.NewDepartmentService(departmentUsecase)
	positionRepo := system.NewPositionRepo(dataData)
	positionUsecase := biz.NewPositionUsecase(positionRepo)
	positionService := service.NewPositionService(positionUsecase)
	organization := handler.NewOrganization(departmentService, positionService)
	announcementRepo := system.NewAnnouncementRepo(dataData)
	announcementUsecase := biz.NewAnnouncementUsecase(announcementRepo)
	announcementService := service.NewAnnouncementService(announcementUsecase)
	announcement := handler.NewAnnouncement(announcementService)
	emailRepo := email.NewEmailRepo(runtime)
	emailUsecase := biz.NewEmailUsecase(emailRepo)
	emailService := service.NewEmailService(emailUsecase)
	handlerEmail := handler.NewEmail(emailService)
	paymentRepo := payment.NewPaymentRepo(dataData)
	paymentOrderRepo := payment.NewPaymentOrderRepo(dataData)
	paymentUsecase := biz.NewPaymentUsecase(paymentRepo, paymentOrderRepo, logger)
	paymentService := service.NewPaymentService(paymentUsecase)
	handlerPayment := handler.NewPayment(paymentService)
	taskRepo := system.NewTaskRepo(dataData)
	taskUsecase := biz.NewTaskUsecase(taskRepo)
	mediaRepo := system.NewMediaRepo(dataData)
	mediaUsecase := biz.NewMediaUsecase(mediaRepo, reloadable, runtimeSettings)
	taskExecutor := worker.NewTaskExecutor(taskUsecase, mediaUsecase, runtime)
	taskScheduler := worker.NewTaskScheduler(taskUsecase, authorityUsecase, taskExecutor, logger)
	taskRuntime := worker.NewTaskRuntime(taskScheduler)
	taskApplicationUsecase := biz.NewTaskApplicationUsecase(taskUsecase, taskRuntime)
	taskService := service.NewTaskService(taskApplicationUsecase)
	task := handler.NewTask(taskService)
	mediaService := service.NewMediaService(mediaUsecase, runtimeSettings)
	media := handler.NewMedia(mediaService)
	auditQueryRepo := system.NewAuditRepo(dataData)
	auditUsecase := biz.NewAuditUsecase(auditQueryRepo)
	auditService := service.NewAuditService(auditUsecase)
	auditRecordRepo := system.NewAuditRecorderRepo(dataData)
	auditRecorderUsecase := biz.NewAuditRecorderUsecase(auditRecordRepo)
	auditRecorder := service.NewAuditRecorder(auditRecorderUsecase)
	logFileRepo := system.NewLogFileRepo(dataData)
	logViewerUsecase := biz.NewLogViewerUsecase(logFileRepo)
	logViewerService := service.NewLogViewerService(logViewerUsecase)
	audit := handler.NewAudit(auditService, auditRecorder, logViewerService, logger)
	exportRepo := system.NewExportRepo(dataData)
	exportUsecase := biz.NewExportUsecase(exportRepo)
	bizCache := cache.New(dataData)
	exportService := service.NewExportService(exportUsecase, bizCache)
	export := handler.NewExport(exportService)
	versionRepo := system.NewVersionRepo(dataData)
	versionUsecase := biz.NewVersionUsecase(versionRepo)
	versionService := service.NewVersionService(versionUsecase)
	version := handler.NewVersion(versionService)
	dictionaryRepo := system.NewDictionaryRepo(dataData)
	dictionaryUsecase := biz.NewDictionaryUsecase(dictionaryRepo)
	dictionaryService := service.NewDictionaryService(dictionaryUsecase)
	dictionary := handler.NewDictionary(dictionaryService)
	parameterRepo := system.NewParameterRepo(dataData)
	parameterUsecase := biz.NewParameterUsecase(parameterRepo)
	parameterService := service.NewParameterService(parameterUsecase)
	parameter := handler.NewParameter(parameterService)
	apiTokenRepo := system.NewAPITokenRepo(dataData)
	tokenUsecase := biz.NewTokenUsecase(apiTokenRepo)
	tokenIssuer := system.NewTokenIssuer(runtimeSettings)
	tokenService := service.NewTokenService(tokenUsecase, tokenIssuer)
	apiToken := handler.NewAPIToken(tokenService)
	initializationRepo := initialize.NewRepo(dataData)
	systemConfigUsecase := biz.NewSystemConfigUsecase(initializationRepo, taskRuntime)
	systemConfigService := service.NewSystemConfigService(systemConfigUsecase, runtimeSettings)
	securityRepo := system.NewSecurityRepo(dataData)
	securityUsecase := biz.NewSecurityUsecase(securityRepo, bizCache, runtimeSettings, tokenUsecase)
	securityService := service.NewSecurityService(securityUsecase)
	systemConfig := handler.NewSystemConfig(systemConfigService, securityService)
	userRepo := system.NewUserRepo(dataData)
	userUsecase := biz.NewUserUsecase(userRepo)
	authenticationUsecase := biz.NewAuthenticationUsecase(userUsecase, securityUsecase, tokenIssuer, auditRecordRepo)
	authService := service.NewAuthService(authenticationUsecase)
	public := handler.NewPublic(authService, systemConfigService, securityService)
	userService := service.NewUserService(userUsecase, securityService)
	user := handler.NewUser(userService, authService)
	navigation := handler.NewNavigation(userService)
	session := handler.NewSession(tokenService)
	set := handler.NewSet(authority, menu, api, permission, organization, announcement, handlerEmail, handlerPayment, task, media, audit, export, version, dictionary, parameter, apiToken, systemConfig, public, user, navigation, session)
	engine := server.NewGinEngine(runtime, accessControlService, set, authService, securityService, auditRecorder, logger, string2)
	httpServer := server.NewGinServer(confServer, engine)
	app := newApp(logger, httpServer, taskScheduler, auditRecorder, reloadableLogger)
	return app, func() {
		cleanup()
	}, nil
}
