package ui

import (
	"go_dreamfactory/cmd/v2/lib/common"
	"go_dreamfactory/cmd/v2/model"
	"go_dreamfactory/cmd/v2/service"
	"go_dreamfactory/cmd/v2/service/observer"
	formview "go_dreamfactory/cmd/v2/ui/views"

	// "go_dreamfactory/modules/friend"
	// "go_dreamfactory/modules/growtask"
	// "go_dreamfactory/modules/hero"
	// "go_dreamfactory/modules/library"
	// "go_dreamfactory/modules/linestory"
	// "go_dreamfactory/modules/mline"
	// "go_dreamfactory/modules/sociaty"
	// "go_dreamfactory/modules/task"
	// "go_dreamfactory/modules/user"
	// "go_dreamfactory/modules/worldtask"

	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/widget"
)

type MyCaseView interface {
	Init(service service.PttService, obs observer.Observer, w fyne.Window, res *widget.Entry)
	CreateView(t *model.TestCase) fyne.CanvasObject
	Load()
}

// 1 注册接口测试的表单试图
var (
	ViewRegister = map[string]MyCaseView{
		// gm
		common.MF("gm", "cmd"): &formview.BingoView{},
		// common.MF(comm.ModuleGM, "gi"):  &formview.GlobalConfView{},
		// reddot
		// common.MF(comm.ModuleReddot, "get"): &formview.ReddotView{},
		//sys
		// common.MF(comm.ModuleSys, "funclist"): &formview.SysFuncListView{},
		//user
		// common.MF(comm.ModuleUser, user.UserSubTypeModifyAvatar): &formview.UserModifyavatarView{},
		// common.MF(comm.ModuleUser, user.UserSubTypeModifyName):   &formview.UserModifynameView{},
		// common.MF(comm.ModuleUser, user.UserSubTypeModifyFigure): &formview.UserModifyfigureView{},
		// common.MF(comm.ModuleUser, user.UserSubTYpeModifyBgp):    &formview.UserModifybgpView{},
		// common.MF(comm.ModuleUser, user.UserSubTypeModifySign):   &formview.UserSignView{},
		// common.MF(comm.ModuleUser, user.UserSubTypeBattlerecord): &formview.UserBattlerecordView{},
		// items
		// common.MF(comm.ModuleItems, "getlist"):  &formview.ItemListView{},
		// common.MF(comm.ModuleItems, "sellitem"): &formview.ItemsSellView{},
		// common.MF(comm.ModuleItems, "useitem"):  &formview.ItemsUseView{},
		//mail
		// common.MF(comm.ModuleMail, "getlist"):               &formview.MailListView{},
		// common.MF(comm.ModuleMail, "readmail"):              &formview.MailReadMailView{},
		// common.MF(comm.ModuleMail, "delmail"):               &formview.MailDelView{},
		// common.MF(comm.ModuleMail, "getusermailattachment"): &formview.MailAttachmentView{},
		// common.MF(comm.ModuleMail, "getallmailattachment"):  &formview.MailAttachmentAllView{},
		//task
		// common.MF(comm.ModuleTask, task.TaskSubTypeList):          &formview.TaskListView{},
		// common.MF(comm.ModuleTask, task.TaskSubTypeActiveList):    &formview.TaskActiveListView{},
		// common.MF(comm.ModuleTask, task.TaskSubTypeActiveReceive): &formview.TaskActiveReceiveView{},
		// common.MF(comm.ModuleTask, task.TaskSubTypeGetrecord):     &formview.RtaskRecordView{},
		// hero
		// common.MF(comm.ModuleHero, hero.HeroSubTypeList):  &formview.HeroListView{},
		// common.MF(comm.ModuleHero, hero.StrengthenUplv):   &formview.HeroStrengthenUplvView{},
		// common.MF(comm.ModuleHero, hero.StrengthenUpStar): &formview.HeroStrengthenUpStarView{},
		// common.MF(comm.ModuleHero, hero.DrawCard):         &formview.HeroZhaomuView{},
		// common.MF(comm.ModuleHero, "info"):                &formview.HeroInfoView{},
		//equip
		// common.MF(comm.ModuleEquipment, "getlist"): &formview.EquipListView{},
		// common.MF(comm.ModuleEquipment, "equip"):   &formview.EquipUpDownView{},
		// common.MF(comm.ModuleEquipment, "upgrade"): &formview.EquipUpgradeView{},
		//friend
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeApply):     &formview.FriendApplyView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeAgree):     &formview.FriendAgreeView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeBlacklist): &formview.FriendBlacklistView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeAddBlack):  &formview.FriendAddBlackView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeDelBlack):  &formview.FriendDelblackView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeSearch):    &formview.FriendSearchView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeRandList):       &formview.FriendRandListView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeGetreward):      &formview.FriendGetrewardView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeAssistlist):     &formview.FriendAssistListView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeAssistHero):     &formview.FriendAssistHeroView{},
		// common.MF(comm.ModuleFriend, friend.FriendSubTypeAssistHeroList): &formview.FriendAssistHeroListView{},

		// shop
		// common.MF(comm.ModuleShop, "getlist"): &formview.ShopListView{},
		// common.MF(comm.ModuleShop, "buy"):     &formview.ShopBuyView{},
		// mailine
		// common.MF(comm.ModuleMline, mline.MlineGetListResp):   &formview.MainlineListView{},
		// common.MF(comm.ModuleMline, mline.MlineChallengeResp): &formview.MainlineChallengeView{},
		// common.MF(comm.ModuleMline, mline.MlineGetRewardResp): &formview.MainlineRewardView{},
		// pagoda
		// common.MF(comm.ModulePagoda, "getlist"): &formview.PagodaListView{},
		// rtask
		common.MF("worldtask", "trigger"): &formview.RtaskTestView{},
		// linestory
		// common.MF(comm.ModuleLinestory, linestory.LinestorySubTypeChapter): &formview.LinestoryMineView{},
		// common.MF(comm.ModuleLibrary, library.LibraryFetterstoryTaskResp):  &formview.FetterstoryView{},
		// gourmet
		// common.MF(comm.ModuleGourmet, "getranduser"): &formview.GourmentGetRandView{},
		// sociaty
		common.MF("sociaty", "list"):     &formview.SociatyListView{},
		common.MF("sociaty", "create"):   &formview.SociatyCreateView{},
		common.MF("sociaty", "mine"):     &formview.SociatyMineView{},
		common.MF("sociaty", "tasklist"): &formview.SociatyTasklistView{},
		// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeRank):     &formview.SociatyRankView{},
		// common.MF(comm.ModuleSociaty, "boss"):                         &formview.SociatyBossView{},
		// troll
		// common.MF(comm.ModuleTroll, "getlist"): &formview.TrollGetlistView{},
		// growtask
		// common.MF(comm.ModuleGrowtask, growtask.GrowtaskSubTypeList): &formview.GrowtaskListView{},
		//worldtask
		common.MF("worldtask", "mine"): &formview.WorldtaskMineView{},
		// common.MF(comm.ModuleWorldtask, "check"):                        &formview.CheckWorldtaskView{},
		// common.MF(comm.ModuleWorldtask, "test"):                         &formview.RtaskTestView{},
		// //smithy
		common.MF("smithy", "tasklist"): &formview.SmithyView{},
		//武馆派遣
		// common.MF(comm.ModuleDispatch, "dispatch"): &formview.DispatchView{},
		// common.MF(comm.ModulePractice, "practice"): &formview.PracticeView{},
		//声望
		// common.MF(comm.ModuleReputation, "reputation"): &formview.ReputationView{},
		//旧时光
		// common.MF(comm.ModuleOldtimes, "oldtimes"): &formview.OldtimesView{},
	}
)
