package impl

import (
	"go.uber.org/dig"
	"yx-dataset-server/app/bll"
	"yx-dataset-server/app/bll/impl/internal"
)

func Inject(container *dig.Container) {
	_ = container.Provide(internal.NewTrans)
	_ = container.Provide(func(b *internal.Trans) bll.ITrans { return b })
	_ = container.Provide(internal.NewLogin)
	_ = container.Provide(func(b *internal.Login) bll.ILogin { return b })
	_ = container.Provide(internal.NewUser)
	_ = container.Provide(func(b *internal.User) bll.IUser { return b })
	_ = container.Provide(internal.NewVerifyCode)
	_ = container.Provide(func(b *internal.VerifyCode) bll.IVerifyCode { return b })
	_ = container.Provide(internal.NewFile)
	_ = container.Provide(func(b *internal.File) bll.IFile { return b })
	_ = container.Provide(internal.NewDataset)
	_ = container.Provide(func(b *internal.Dataset) bll.IDataset { return b })
	_ = container.Provide(internal.NewDatasetFile)
	_ = container.Provide(func(b *internal.DatasetFile) bll.IDatasetFile { return b })
	_ = container.Provide(internal.NewLoginHistory)
	_ = container.Provide(func(b *internal.LoginHistory) bll.ILoginHistory { return b })
	_ = container.Provide(internal.NewOrganization)
	_ = container.Provide(func(b *internal.Organization) bll.IOrganization { return b })

	_ = container.Provide(internal.NewRole)
	_ = container.Provide(func(b *internal.Role) bll.IRole { return b })
	_ = container.Provide(internal.NewMenu)
	_ = container.Provide(func(b *internal.Menu) bll.IMenu { return b })

	_ = container.Provide(internal.NewChatAssistant)
	_ = container.Provide(func(b *internal.ChatAssistant) bll.IChatAssistant { return b })
	_ = container.Provide(internal.NewChatSession)
	_ = container.Provide(func(b *internal.ChatSession) bll.IChatSession { return b })
	_ = container.Provide(internal.NewChatMessage)
	_ = container.Provide(func(b *internal.ChatMessage) bll.IChatMessage { return b })

	// RobotConfig 依赖 dingtalk.Client，由 boot.go 初始化后注入
	_ = container.Provide(internal.NewRobotConfig)
	_ = container.Provide(func(b *internal.RobotConfig) bll.IRobotConfig { return b })

}
