local SummonWishCell = class("SummonWishCell", BaseCell)

local LOCK_ICON = "equip_lock_"
local UNLOCK_ICON = "equip_activation_"
function SummonWishCell:refresh(data, type)
	local uiMap = self:getUIMap()
	local icon = uiMap["qlt_skill_desc_cell.icon"]
	local desc = uiMap["qlt_skill_desc_cell.desc"]

	local iconName
	local str
	if data.unlock then
		iconName = UNLOCK_ICON .. data.qlt
		if type == GConst.TipsConst.SUMMON_PROBABILITY_TYPE.SUMMON_BLACK_FRIDAY then
			str = string.format("<color=#7136C6>%s</color>", data.desc)
		else
			str = string.format("<color=#996B3D>%s</color>", data.desc)
		end
	else
		iconName = LOCK_ICON .. data.qlt
		if type == GConst.TipsConst.SUMMON_PROBABILITY_TYPE.SUMMON_BLACK_FRIDAY then
			str = string.format("<color=#7B7E9B>%s</color>", data.desc)
		else
			str = string.format("<color=#996B3D80>%s</color>", data.desc)
		end
	end

	desc:setText(str)
	icon:setSprite(GConst.ATLAS_PATH.UI_EQUIP, iconName)
	self:getBaseObject():setSizeDeltaY(desc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight + 4)
end

return SummonWishCell