package system

import "kra/internal/biz/system"

// ApiGroup 系统API组
type ApiGroup struct {
	BaseApi
	UserApi
	ApiApi
	AuthorityApi
	AuthorityBtnApi
	MenuApi
	DictionaryApi
	DictionaryDetailApi
	CasbinApi
	JwtApi
	OperationRecordApi
	ParamsApi
	ErrorApi
	VersionApi
	SystemApi
	ExportTemplateApi
	DBApi
	AutoCodeApi
	AutoCodeHistoryApi
	AutoCodePackageApi
	AutoCodeTemplateApi
	AutoCodePluginApi
	AutoCodeMcpApi
}

// 业务层依赖
var (
	userUsecase             *system.UserUsecase
	apiUsecase              *system.ApiUsecase
	authorityUsecase        *system.AuthorityUsecase
	authorityBtnUsecase     *system.AuthorityBtnUsecase
	menuUsecase             *system.MenuUsecase
	dictionaryUsecase       *system.DictionaryUsecase
	casbinUsecase           *system.CasbinUsecase
	jwtBlacklistUsecase     *system.JwtBlacklistUsecase
	operationRecordUsecase  *system.OperationRecordUsecase
	paramsUsecase           *system.ParamsUsecase
	errorUsecase            *system.ErrorUsecase
	versionUsecase          *system.VersionUsecase
	systemUsecase           *system.SystemUsecase
	exportTemplateUsecase   *system.ExportTemplateUsecase
	autoCodeUsecase         *system.AutoCodeUsecase
	autoCodeHistoryUsecase  *system.AutoCodeHistoryUsecase
	autoCodePackageUsecase  *system.AutoCodePackageUsecase
	autoCodeTemplateUsecase *system.AutoCodeTemplateUsecase
	autoCodePluginUsecase   *system.AutoCodePluginUsecase
	autoCodeMcpUsecase      *system.AutoCodeMCPUsecase
)

// InitUsecases 初始化业务层依赖
func InitUsecases(
	user *system.UserUsecase,
	api *system.ApiUsecase,
	authority *system.AuthorityUsecase,
	authorityBtn *system.AuthorityBtnUsecase,
	menu *system.MenuUsecase,
	dictionary *system.DictionaryUsecase,
	casbin *system.CasbinUsecase,
	jwtBlacklist *system.JwtBlacklistUsecase,
	operationRecord *system.OperationRecordUsecase,
	params *system.ParamsUsecase,
	sysError *system.ErrorUsecase,
	version *system.VersionUsecase,
	sysSystem *system.SystemUsecase,
	exportTemplate *system.ExportTemplateUsecase,
	autoCode *system.AutoCodeUsecase,
	autoCodeHistory *system.AutoCodeHistoryUsecase,
	autoCodePackage *system.AutoCodePackageUsecase,
	autoCodeTemplate *system.AutoCodeTemplateUsecase,
	autoCodePlugin *system.AutoCodePluginUsecase,
	autoCodeMcp *system.AutoCodeMCPUsecase,
) {
	userUsecase = user
	apiUsecase = api
	authorityUsecase = authority
	authorityBtnUsecase = authorityBtn
	menuUsecase = menu
	dictionaryUsecase = dictionary
	casbinUsecase = casbin
	jwtBlacklistUsecase = jwtBlacklist
	operationRecordUsecase = operationRecord
	paramsUsecase = params
	errorUsecase = sysError
	versionUsecase = version
	systemUsecase = sysSystem
	exportTemplateUsecase = exportTemplate
	autoCodeUsecase = autoCode
	autoCodeHistoryUsecase = autoCodeHistory
	autoCodePackageUsecase = autoCodePackage
	autoCodeTemplateUsecase = autoCodeTemplate
	autoCodePluginUsecase = autoCodePlugin
	autoCodeMcpUsecase = autoCodeMcp
}

// Api类型定义
type AutoCodePackageApi struct{}
type AutoCodeTemplateApi struct{}
type AutoCodePluginApi struct{}
type AutoCodeMcpApi struct{}
