local ArenaGradingCell = class("ArenaGradingCell", BaseCell)

function ArenaGradingCell:init()
    local uiMap = self:getUIMap()

    self.imgGrading = uiMap["arena_grading_cell.img_grading"]
    self.imgIdx = uiMap["arena_grading_cell.img_idx"]
    self.txGrading = uiMap["arena_grading_cell.tx_grading"]
end

function ArenaGradingCell:refresh(id)
    if id == nil then
        return
    end

    self.txGrading:setText(DataManager.ArenaData:getGradingName(id))
    self.imgIdx:setSprite(GConst.ATLAS_PATH.ARENA, DataManager.ArenaData:getGradingNumName(id))
    self.imgGrading:setSprite(GConst.ATLAS_PATH.ARENA, DataManager.ArenaData:getGradingIconName(id))
end

return ArenaGradingCell