local SideBarActSprintCell = class("SideBarActSprintCell", SideBarBaseCell)
function SideBarActSprintCell:getModuleKey()
    return ModuleManager.MODULE_KEY.ACT_GOGOGO
end

function SideBarActSprintCell:getIsOpen()
    return DataManager.ActSprintData:getIsOpen()
end

function SideBarActSprintCell:getHasPurchase()
    return true
end

function SideBarActSprintCell:getSpineName()
    return "ui_main_btn_act_gogogo"
end

function SideBarActSprintCell:onClick()
    ModuleManager.ActSprintManager:showActSprintMainUI()
end

function SideBarActSprintCell:getIsShowRedPoint()
    return DataManager.ActSprintData:hasRedPoint()
end

function SideBarActSprintCell:getCellName()
    return I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_1)
end

function SideBarActSprintCell:updateTime()
    if self:getIsOpen() then
        self:_refreshTime()
    else
        self.isInitSpine = false
        self:closeBtn()
    end
end
function SideBarActSprintCell:_refreshTime()
    local remainTime = DataManager.ActSprintData:getRemainTime()
    if remainTime then
        self.timeBg:setActive(true)
        if remainTime < 0 then
            remainTime = 0
        end
        self.txTime:setText(Time:formatNumTimeStr(remainTime))
    else
        self.timeBg:setActive(false)
    end
end

return SideBarActSprintCell