local this = class("flyMsgPriorityShowData", require("ui.manager.priorityShowQueue.priorityShowData"))
local _uiViewTpl = L_GameTpl:getUiViewTpl()

function this:ctor(data)
  this.super.ctor(self, data)
  local uuid = data.uuid
  self.flyMsgType = data.flyMsgType
  local params = data.params
  local popup = params[1]
  local tpl = _uiViewTpl:getTplByName(self.flyMsgType)
  if tpl then
    self._priorityDataType = _uiViewTpl:getPanelType(tpl)
    self._priority = _uiViewTpl:getQueue(tpl)
    self._checkShowFunc = _uiViewTpl:getCheckshowfun(tpl)
    self._blockType = _uiViewTpl:getBlockIgnore(tpl)
  else
    printf("priorityShowQueueManager", "flyMsgType not in flyMsgPriorityMap ", self.flyMsgType)
  end
  self.uuid = uuid
  self.params = popup
end

function this:getDesc()
  local uuid = self.uuid or "nil"
  local flyMsgType = self.flyMsgType or "nil"
  local desc = "flyMsgType " .. flyMsgType .. " uuid " .. uuid .. this.super.getDesc(self)
  return desc
end

function this:doShow()
  if self.flyMsgType == L_ShowQueueConst.flyMsgType.activity then
    L_FlyMsgManager:rawShowActivityTaskPopup(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.achievement then
    L_FlyMsgManager:rawShowAchievementPopup(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.homeContentUnlock then
    L_FlyMsgManager:rawShowHomeContentUnlock(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.mountRidingUnlock then
    L_FlyMsgManager:rawShowMountRidingUnlock(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.homeScienceExp then
    L_FlyMsgManager:rawShowHomeScienceExpTip(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.taskTip then
    L_FlyMsgManager:rawShowTaskTip(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.rewardMsg then
    L_FlyMsgManager:rawShowRewardPopup(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.areaMsg then
    L_FlyMsgManager:rawShowAreaPopup(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.petEatFinishMsg then
    L_FlyMsgManager:rawShowPetEatFinishPopup(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.exploreComplete then
    L_FlyMsgManager:rawShowMapExploreComplete(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.exploreLvUp then
    L_FlyMsgManager:rawShowMapExploreLvUp(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.getPet then
    L_FlyMsgManager:rawShowGetPetTip(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.petCatalog then
    L_FlyMsgManager:rawShowPetCatalogTip(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.petGeneMutation then
    L_FlyMsgManager:rawShowPetGeneMutationTip(self.uuid, self.params)
  elseif self.flyMsgType == L_ShowQueueConst.flyMsgType.petFavorable then
    L_FlyMsgManager:rawShowHomePetFavorableTip(self.uuid, self.params)
  else
    errorf("priorityShowQueueManager self.flyMsgType " .. (self.flyMsgType or "nil") .. " not exist ")
  end
  this.super.doShow(self)
end

function this:doHide()
  this.super.doHide(self)
end

function this:checkStopGuide()
  local tpl = _uiViewTpl:getTplByName(self.flyMsgType)
  return _uiViewTpl:checkStopGuide(tpl)
end

function this:checkIsCurDataInter(flyMsgType, uuid)
  return self.uuid == uuid
end

return this
