local this = {}
local _staminaChestDropTpl = L_GameTpl:getStaminaChestDropTpl()

function this:checkCondition(entity, param)
  return true
end

function this:executeInteract(entity, param)
  local curModule = L_WorldManager:getCurModule()
  local staminaChestId, callback
  if curModule == L_Const.worldModule.dungeon then
    local curDungeonId = L_DungeonStore:getDungeonCampaignInfoCSData().dungeonId
    local tpl = _staminaChestDropTpl:getTplByWorldFilter(L_Const.StaminaBoxSystemType.SBST_CAMPAIGN, curDungeonId)
    staminaChestId = _staminaChestDropTpl:getId(tpl)
  elseif curModule == L_Const.worldModule.multiDungeon then
    local curDungeonId = L_MultiDungeonStore:getCurMultiDungeonInfo().dungeon_id
    local tpl = _staminaChestDropTpl:getTplByWorldFilter(L_Const.StaminaBoxSystemType.SBST_MULTI_CAMPAIGN, curDungeonId)
    staminaChestId = _staminaChestDropTpl:getId(tpl)
    
    function callback()
      C_AudioManager.Play("Play_SFX_System_HUD_General_Item_Obtain")
      L_UI:open("pageMultiDungeonSettle")
    end
  end
  L_UI:open("pageDungeonReward", {
    staminaChestId = staminaChestId,
    openFromType = 1,
    callback = callback
  })
end

function this:getDisplayName(entity, param)
  return
end

return this
