local LanguageCell = class("LanguageCell", BaseCell)

function LanguageCell:refresh(language)
    local uiMap = self:getUIMap()
    if language == I18N:getCurLanguage() then
        uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_3")
    else
        uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_dark_4")
    end
    uiMap["language_cell.name_bg"]:setSprite(GConst.ATLAS_PATH.UI_SETTING, "language_" .. language)
end

function LanguageCell:addClickListener(func)
    self:getBaseObject():addClickListener(func)
end

return LanguageCell