local this = {}
local DotDef = {
  Menu = "Menu",
  Hero = "Hero",
  HeroNew = "HeroNew_%s",
  HeroStar = "HeroStar_%s",
  HeroSkill = "HeroSkill_%s",
  HeroSpirit = "HeroSpirit_%s",
  HeroJewel = "HeroJewel_%s",
  HeroInfo = "HeroInfo_%s",
  HeroAcc = "HeroAcc_%s",
  HeroTalent = "HeroTalent_%s",
  SpiritSory = "SpiritSory_%s",
  Gacha = "Gacha_%s",
  Friend = "Friend",
  Mail = "Mail",
  SpecialShop = "SpecialShop",
  Achieve = "Achieve_%s",
  PlayerInfo = "PlayerInfo",
  Title = "Title_%s",
  TitlePre = "TitlePre",
  TitleSuf = "TitleSuf",
  Activity = "Activity",
  AllActivity = "AllActivity",
  DairyActivity = "DairyActivity",
  WeeklyActivity = "WeeklyActivity",
  NoviceTask = "NoviceTask",
  WorldExplore = "WorldExplore_%s",
  Pet = "Pet",
  PetNew = "PetNew_%s",
  PetGeneMutation = "PetGeneMutation_%s",
  PetRankUp = "PetRankUp_%s",
  EntrustTask = "EntrustTask",
  EntrustTaskDifficulty = "EntrustTaskDifficulty_%s",
  EntrustTrain = "EntrustTrain_%s",
  EntrustBattleTask = "EntrustBattleTask_%s",
  CookNew = "CookNew_%s",
  Bag = "Bag",
  SpiritNew = "SpiritNew_%s",
  JewelNew = "JewelNew_%s",
  Home = "Home",
  HomeScience = "HomeScience",
  HomeScienceType = "HomeScienceType_%s",
  PamiTalk = "PamiTalk",
  PamiTalkCategory = "PamiTalkCategory_%s",
  PamiTalkGroup = "PamiTalkGroup_%s",
  PamiTalkLetter = "PamiTalkLetter_%s",
  Announcement = "Announcement",
  AnnouncementActive = "Announcement_%s",
  MainCityHomeTechLevelShow = "MainCityHomeTechLevelShow",
  LevelUnlockHomeContent = "LevelUnlockHomeContent_%s",
  NewTask = "newTask_%s",
  NewTutorialGuide = "NewTutorialGuide_%s",
  NewEmoji = "NewEmoji_%s",
  Mount = "Mount",
  MountNew = "MountNew_%s",
  GameAct_ActCenter = "GameAct_ActCenter",
  GameAct_New = "GameAct_New_%s",
  GameAct_EventsInCenter = "GameAct_EventsInCenter_%d",
  PlayerDressItem = "PlayerDress_%s",
  PlayerDressEntrance = "PlayerDress",
  PlayerDressTab = "PlayerDressTab_%s",
  HomeCenter = "HomeCenter",
  HomeCenter_BuildingManage_ReceiveAll = "HomeCenter_BuildingManage_ReceiveAll",
  HomeCenter_BuildingManage_ReceiveAll_Production = "HomeCenter_BuildingManage_ReceiveAll_Production",
  HomeCenter_BuildingManage_ReceiveAll_Crop = "HomeCenter_BuildingManage_ReceiveAll_Crop",
  HomeCenter_BuildingManage_ReceiveAll_Collection = "HomeCenter_BuildingManage_ReceiveAll_Collection",
  PetCatalog = "PetCatalog"
}

function this:initReddotConfs()
  local DotConf = {
    [DotDef.Menu] = {
      subNodes = {
        DotDef.Home,
        DotDef.Gacha,
        DotDef.Friend,
        DotDef.Achieve,
        DotDef.Mail,
        DotDef.PlayerInfo,
        DotDef.CookNew
      }
    },
    [DotDef.Hero] = {
      subNodes = {
        DotDef.HeroNew,
        DotDef.HeroStar,
        DotDef.HeroTalent
      }
    },
    [DotDef.PamiTalk] = {
      subNodes = {
        DotDef.PamiTalkCategory,
        DotDef.PamiTalkGroup,
        DotDef.PamiTalkLetter
      }
    },
    [DotDef.HeroAcc] = {listFunc = "getHeroAcc"},
    [DotDef.HeroNew] = {
      listFunc = "getDotHeroNew"
    },
    [DotDef.HeroStar] = {
      listFunc = "getDotHeroStar",
      unlock = L_SystemConst.enum.star
    },
    [DotDef.HeroSkill] = {
      listFunc = "getDotHeroSkill",
      unlock = L_SystemConst.enum.skill
    },
    [DotDef.HeroSpirit] = {
      listFunc = "getDotHeroSpirit",
      unlock = L_SystemConst.enum.spiritron
    },
    [DotDef.HeroTalent] = {
      listFunc = "getDotHeroTalent",
      unlock = L_SystemConst.enum.heroTalent
    },
    [DotDef.HeroJewel] = {
      listFunc = "getDotHeroJewel",
      unlock = L_SystemConst.enum.accessory
    },
    [DotDef.HeroInfo] = {
      listFunc = "getDotHeroInfo",
      unlock = L_SystemConst.enum.heroData
    },
    [DotDef.SpiritSory] = {
      listFunc = "getDotSpiritStory",
      unlock = L_SystemConst.enum.spiritron
    },
    [DotDef.Gacha] = {
      listFunc = "getDotGacha",
      unlock = L_SystemConst.enum.gacha
    },
    [DotDef.Friend] = {
      getFunc = "getDotFriend",
      unlock = L_SystemConst.enum.friend
    },
    [DotDef.Mail] = {
      getFunc = "getDotMail",
      unlock = L_SystemConst.enum.mail
    },
    [DotDef.SpecialShop] = {
      getFunc = "getDotSpecialShop",
      unlock = L_SystemConst.enum.specialShop
    },
    [DotDef.Achieve] = {
      listFunc = "getDotAchieve",
      unlock = L_SystemConst.enum.achievement
    },
    [DotDef.PlayerInfo] = {
      subNodes = {
        DotDef.Title
      }
    },
    [DotDef.Title] = {
      listFunc = "getDotTitle",
      unlock = L_SystemConst.enum.playerCard
    },
    [DotDef.TitlePre] = {
      getFunc = "getDotTitlePre"
    },
    [DotDef.TitleSuf] = {
      getFunc = "getDotTitleSuf"
    },
    [DotDef.Activity] = {
      subNodes = {
        DotDef.AllActivity
      }
    },
    [DotDef.AllActivity] = {
      subNodes = {
        DotDef.DairyActivity,
        DotDef.WeeklyActivity
      }
    },
    [DotDef.DairyActivity] = {
      getFunc = "getDairyDotActivity",
      unlock = L_SystemConst.enum.activation
    },
    [DotDef.WeeklyActivity] = {
      getFunc = "getWeeklyDotActivity",
      unlock = L_SystemConst.enum.activation
    },
    [DotDef.NoviceTask] = {
      getFunc = "getNoviceTaskDot",
      unlock = L_SystemConst.enum.noviceTask
    },
    [DotDef.WorldExplore] = {
      listFunc = "getDotWorldExplore"
    },
    [DotDef.Pet] = {
      subNodes = {
        DotDef.PetNew,
        DotDef.PetGeneMutation
      }
    },
    [DotDef.PetNew] = {
      listFunc = "getDotPetNew",
      unlock = L_SystemConst.enum.pet
    },
    [DotDef.PetGeneMutation] = {
      listFunc = "getDotPetGeneMutation",
      unlock = L_SystemConst.enum.pet
    },
    [DotDef.PetRankUp] = {
      listFunc = "getPetRankUp",
      unlock = L_SystemConst.enum.pet
    },
    [DotDef.EntrustTask] = {
      subNodes = {
        DotDef.EntrustTaskDifficulty
      }
    },
    [DotDef.EntrustTaskDifficulty] = {
      listFunc = "getDotEntrustTaskDifficulty",
      unlock = L_SystemConst.enum.entrustTask
    },
    [DotDef.EntrustTrain] = {
      listFunc = "getDotEntrustTrain",
      unlock = L_SystemConst.enum.entrustTask
    },
    [DotDef.EntrustBattleTask] = {
      listFunc = "getDotEntrustBattleTask",
      unlock = L_SystemConst.enum.entrustTask
    },
    [DotDef.Bag] = {
      subNodes = {},
      unlock = L_SystemConst.enum.bag
    },
    [DotDef.SpiritNew] = {
      listFunc = "getDotSpiritNew"
    },
    [DotDef.JewelNew] = {
      listFunc = "getDotJewelNew"
    },
    [DotDef.NewTutorialGuide] = {
      listFunc = "getDotNewTutorialGuide"
    },
    [DotDef.Home] = {
      subNodes = {
        DotDef.HomeScience
      }
    },
    [DotDef.HomeScience] = {
      subNodes = {
        DotDef.HomeScienceType
      }
    },
    [DotDef.HomeScienceType] = {
      listFunc = "getTechnologyTypeRedList",
      unlock = L_SystemConst.enum.homeScience
    },
    [DotDef.PamiTalkGroup] = {
      listFunc = "getDotPamiTalkGroup",
      unlock = L_SystemConst.enum.pamiTalk
    },
    [DotDef.PamiTalkLetter] = {
      listFunc = "getDotPamiTalkLetter",
      unlock = L_SystemConst.enum.pamiTalk
    },
    [DotDef.PamiTalkCategory] = {
      listFunc = "getDotPamiTalkCategory",
      unlock = L_SystemConst.enum.pamiTalk
    },
    [DotDef.Announcement] = {
      subNodes = {
        DotDef.AnnouncementActive
      }
    },
    [DotDef.AnnouncementActive] = {
      listFunc = "getDotAnnouncementActive",
      unlock = L_SystemConst.enum.announcemenet
    },
    [DotDef.MainCityHomeTechLevelShow] = {
      subNodes = {
        DotDef.LevelUnlockHomeContent
      }
    },
    [DotDef.LevelUnlockHomeContent] = {
      listFunc = "getDotHomeLevelNew"
    },
    [DotDef.NewEmoji] = {
      listFunc = "getDotNewEmoji",
      unlock = L_SystemConst.enum.chat
    },
    [DotDef.Mount] = {
      subNodes = {
        DotDef.MountNew
      }
    },
    [DotDef.MountNew] = {
      listFunc = "getDotMountNew",
      unlock = L_SystemConst.enum.mount
    },
    [DotDef.GameAct_ActCenter] = {
      subNodes = {
        DotDef.GameAct_New,
        DotDef.GameAct_EventsInCenter
      }
    },
    [DotDef.GameAct_New] = {
      listFunc = "getDotGameActNew",
      unlock = L_SystemConst.enum.gameAct
    },
    [DotDef.GameAct_EventsInCenter] = {
      listFunc = "getDotGameActEventsInCenter",
      unlock = L_SystemConst.enum.gameAct
    },
    [DotDef.HomeCenter] = {
      subNodes = {
        DotDef.HomeCenter_BuildingManage_ReceiveAll
      }
    },
    [DotDef.HomeCenter_BuildingManage_ReceiveAll] = {
      subNodes = {
        DotDef.HomeCenter_BuildingManage_ReceiveAll_Production,
        DotDef.HomeCenter_BuildingManage_ReceiveAll_Crop,
        DotDef.HomeCenter_BuildingManage_ReceiveAll_Collection
      }
    },
    [DotDef.HomeCenter_BuildingManage_ReceiveAll_Production] = {
      getFunc = "getDotHomeCenterBuildingManageReceiveAllProduction",
      unlock = L_SystemConst.enum.home
    },
    [DotDef.HomeCenter_BuildingManage_ReceiveAll_Crop] = {
      getFunc = "getDotHomeCenterBuildingManageReceiveAllCrop",
      unlock = L_SystemConst.enum.home
    },
    [DotDef.HomeCenter_BuildingManage_ReceiveAll_Collection] = {
      getFunc = "getDotHomeCenterBuildingManageReceiveAllCollection",
      unlock = L_SystemConst.enum.home
    },
    [DotDef.PetCatalog] = {bindNodeId = 1001}
  }
  local EventConf = {
    {
      key = DotDef.HeroNew,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroSkill,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroSkill,
      store = L_BagStore,
      event = L_BagStore.event.refreshBag
    },
    {
      key = DotDef.HeroStar,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroStar,
      store = L_BagStore,
      event = L_BagStore.event.refreshBag
    },
    {
      key = DotDef.HeroSpirit,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroSpirit,
      store = L_SpiritronStore,
      event = L_SpiritronStore.event.refreshWeapon
    },
    {
      key = DotDef.HeroSpirit,
      store = L_SystemUnlockStore,
      event = L_SystemUnlockStore.event.onDataChange
    },
    {
      key = DotDef.HeroJewel,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroJewel,
      store = L_AccessoryStore,
      event = L_AccessoryStore.event.refreshAccessoryList
    },
    {
      key = DotDef.HeroInfo,
      store = L_TaskStore,
      event = L_TaskStore.event.refreshTask
    },
    {
      key = DotDef.HeroInfo,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroInfo,
      store = L_HeroStore,
      event = L_HeroStore.event.heroDataSync
    },
    {
      key = DotDef.HeroTalent,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroTalent,
      store = L_BagStore,
      event = L_BagStore.event.refreshBag
    },
    {
      key = DotDef.SpiritSory,
      store = L_TaskStore,
      event = L_TaskStore.event.refreshTask
    },
    {
      key = DotDef.SpiritSory,
      store = L_SpiritronStore,
      event = L_SpiritronStore.event.spiritStoryRefresh
    },
    {
      key = DotDef.Gacha,
      store = L_RaffleStore,
      event = L_RaffleStore.event.refreshCardPoolList
    },
    {
      key = DotDef.Gacha,
      store = L_SystemUnlockStore,
      event = L_SystemUnlockStore.event.onDataChange
    },
    {
      key = DotDef.Friend,
      store = L_FriendStore,
      event = L_FriendStore.event.refreshIdList
    },
    {
      key = DotDef.WeeklyActivity,
      store = L_ActivityTaskStore,
      event = L_ActivityTaskStore.event.refreshActivityReddot
    },
    {
      key = DotDef.DairyActivity,
      store = L_ActivityTaskStore,
      event = L_ActivityTaskStore.event.refreshActivityReddot
    },
    {
      key = DotDef.NoviceTask,
      store = L_NoviceTaskStore,
      event = L_NoviceTaskStore.event.refreshNoviceTaskReddot
    },
    {
      key = DotDef.PetNew,
      store = L_PetStore,
      event = L_PetStore.event.refreshNewPet
    },
    {
      key = DotDef.PetGeneMutation,
      store = L_PetStore,
      event = L_PetStore.event.refreshPet
    },
    {
      key = DotDef.EntrustTaskDifficulty,
      store = L_EntrustStore,
      event = L_EntrustStore.event.entrustInfoRefresh
    },
    {
      key = DotDef.EntrustTaskDifficulty,
      store = L_EntrustStore,
      event = L_EntrustStore.event.entrustRewardRefresh
    },
    {
      key = DotDef.EntrustTrain,
      store = L_EntrustStore,
      event = L_EntrustStore.event.entrustTrainRefresh
    },
    {
      key = DotDef.PetRankUp,
      store = L_PetStore,
      event = L_PetStore.event.refreshPet
    },
    {
      key = DotDef.PetRankUp,
      store = L_BagStore,
      event = L_BagStore.event.refreshBag
    },
    {
      key = DotDef.SpiritNew,
      store = L_SpiritronStore,
      event = L_SpiritronStore.event.refreshWeapon
    },
    {
      key = DotDef.JewelNew,
      store = L_AccessoryStore,
      event = L_AccessoryStore.event.refreshAccessoryList
    },
    {
      key = DotDef.Mail,
      store = L_MailStore,
      event = L_MailStore.event.refreshMailRedInfo
    },
    {
      key = DotDef.Achieve,
      store = L_AchievementStore,
      event = L_AchievementStore.event.refreshAchievementList
    },
    {
      key = DotDef.WorldExplore,
      store = L_ReddotStore,
      event = L_ReddotStore.event.reddotUpdate
    },
    {
      key = DotDef.HomeScienceType,
      store = L_TechnologyStore,
      event = L_TechnologyStore.event.refresh
    },
    {
      key = DotDef.HomeScienceType,
      store = L_TechnologyStore,
      event = L_TechnologyStore.event.refreshDot
    },
    {
      key = DotDef.PamiTalkCategory,
      store = L_PamiTalkStore,
      event = L_PamiTalkStore.event.refreshLetterRedDot
    },
    {
      key = DotDef.PamiTalkGroup,
      store = L_PamiTalkStore,
      event = L_PamiTalkStore.event.refreshLetterRedDot
    },
    {
      key = DotDef.PamiTalkLetter,
      store = L_PamiTalkStore,
      event = L_PamiTalkStore.event.refreshLetterRedDot
    },
    {
      key = DotDef.AnnouncementActive,
      store = L_AnnouncementStore,
      event = L_AnnouncementStore.event.refreshAnnouncementRedDot
    },
    {
      key = DotDef.LevelUnlockHomeContent,
      store = L_PlayerStore,
      event = L_PlayerStore.event.refreshBaseInfo
    },
    {
      key = DotDef.NewTutorialGuide,
      store = L_GuideStore,
      event = L_GuideStore.event.onUpdate
    },
    {
      key = DotDef.NewEmoji,
      store = L_ChatStore,
      event = L_ChatStore.event.refreshEmojiInfo
    },
    {
      key = DotDef.MountNew,
      store = L_MountStore,
      event = L_MountStore.event.unlockMountRide
    },
    {
      key = DotDef.GameAct_New,
      store = L_GameEventStore,
      event = L_GameEventStore.event.gameEventSync
    },
    {
      key = DotDef.GameAct_EventsInCenter,
      store = L_GameEventStore,
      event = L_GameEventStore.event.gameEventSync
    },
    {
      key = DotDef.HeroAcc,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroAcc,
      store = L_SpiritronStore,
      event = L_SpiritronStore.event.refreshWeapon
    },
    {
      key = DotDef.HeroAcc,
      store = L_SystemUnlockStore,
      event = L_SystemUnlockStore.event.onDataChange
    },
    {
      key = DotDef.HeroAcc,
      store = L_HeroStore,
      event = L_HeroStore.event.heroSync
    },
    {
      key = DotDef.HeroAcc,
      store = L_AccessoryStore,
      event = L_AccessoryStore.event.refreshAccessoryList
    },
    {
      key = DotDef.HomeCenter_BuildingManage_ReceiveAll_Production,
      store = L_HomeStore,
      event = L_HomeStore.event.refreshModuleHomeCenterBuildingManageReceiveAllDot
    },
    {
      key = DotDef.HomeCenter_BuildingManage_ReceiveAll_Crop,
      store = L_HomeStore,
      event = L_HomeStore.event.refreshModuleHomeCenterBuildingManageReceiveAllDot
    },
    {
      key = DotDef.HomeCenter_BuildingManage_ReceiveAll_Collection,
      store = L_CollectionStore,
      event = L_CollectionStore.event.refreshModuleHomeCenterBuildingManageReceiveAllDot
    }
  }
  self.DotConf = DotConf
  self.EventConf = EventConf
end

this.DotDef = DotDef
return this
