local SelectSkillCell = class("SelectSkillCell", BaseCell)

function SelectSkillCell:refresh(skillId, count, value)
    if value then
        value = "+" .. value
    end
    if ModuleManager.HeroManager:showValueRogue(skillId) or count == 1 then
        count = nil
    else
        value = nil
    end
    local uiMap = self:getUIMap()
    uiMap["skill_select_cell.icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
    uiMap["skill_select_cell.value"]:setText(value or GConst.EMPTY_STRING)
    uiMap["skill_select_cell.count"]:setText(count or GConst.EMPTY_STRING)
    self.baseObject:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId))
end

function SelectSkillCell:addClickListener(func)
    self.baseObject:addClickListener(func)
end

return SelectSkillCell