local this = class("settingCheckAdapter")
local _optionDataTpl = L_GameTpl:getOptionDataTpl()

function this:ctor()
end

function this:checkState(id, tempData)
  if self[id] then
    return self[id](self, tempData)
  else
    return L_Const.settingState.none
  end
end

this[L_Const.settingType.dlss] = function(self)
  local isSupport = C_SettingUtility.IsSupportDLSS()
  local res = L_GameUtil.isUnder1080()
  if res then
    return L_Const.settingState.hide
  end
  if isSupport then
    return L_Const.settingState.none
  else
    return L_Const.settingState.block, L_Const.settingBlockType.hardware
  end
end
this[L_Const.settingType.dlssLevel] = function(self, tempData)
  local isSupport = C_SettingUtility.IsSupportDLSS()
  if isSupport then
    if tempData and tempData[L_Const.settingType.dlss] and tempData[L_Const.settingType.dlss] == "false" then
      return L_Const.settingState.hide
    end
    if L_GameUtil.isUnder1080() then
      return L_Const.settingState.hide
    end
    if L_SettingStore:getSetData(L_Const.settingType.dlss) == "false" then
      return L_Const.settingState.hide
    end
    return L_Const.settingState.none
  else
    return L_Const.settingState.hide
  end
end
this[L_Const.settingType.renderAccuracy] = function(self, tempData)
  local isSupport = C_SettingUtility.IsSupportDLSS()
  if isSupport then
    if tempData and tempData[L_Const.settingType.dlss] and tempData[L_Const.settingType.dlss] == "true" then
      return L_Const.settingState.block
    end
    if L_SettingStore:getSetData(L_Const.settingType.dlss) == "true" then
      return L_Const.settingState.block
    end
  end
  return L_Const.settingState.none
end
this[L_Const.settingType.resolution] = function(self)
  if L_DeviceTpl:getEquipment() == L_Const.equipment.pc and L_SettingStore:getSetNumData(L_Const.settingType.windowMode) == 3 then
    return L_Const.settingState.block
  end
  return L_Const.settingState.none
end
return this
