local RecruitDisplayConfig = BaseClass("RecruitDisplayConfig")
local __init = function(self)
  self.k1 = ""
  self.k2 = ""
  self.k3 = 0
  self.k4 = ""
  self.hash1 = {}
  self.hash2 = {}
  self.dict1 = {}
  self.dict2 = {}
end
local __delete = function(self)
  self.k1 = nil
  self.k2 = nil
  self.k3 = nil
  self.k4 = nil
  self.hash1 = nil
  self.hash2 = nil
  self.dict1 = nil
  self.dict2 = nil
end
local Init = function(self)
  self.k1 = LuaEntry.DataConfig:TryGetStr("recruit_display", "k1")
  self.k2 = LuaEntry.DataConfig:TryGetStr("recruit_display", "k2")
  self.k3 = LuaEntry.DataConfig:TryGetStr("recruit_display", "k3")
  self.k4 = LuaEntry.DataConfig:TryGetStr("recruit_display", "k4")
  local array1 = string.split(self.k1, ";")
  for _, v in ipairs(array1) do
    if not table.hasvalue(self.hash1, v) then
      table.insert(self.hash1, v)
    end
  end
  local array2 = string.split(self.k2, ";")
  for _, v in ipairs(array2) do
    if not table.hasvalue(self.hash2, v) then
      table.insert(self.hash2, v)
    end
  end
  local array3 = string.split(self.k4, "|")
  for _, v in ipairs(array3) do
    local array4 = string.split(v, ";")
    if 2 < #array4 then
      if self.dict1[array4[1]] == nil then
        self.dict1[array4[1]] = tonumber(array4[2])
      end
      if self.dict2[array4[2]] == nil then
        self.dict2[array4[2]] = array4[3]
      end
    end
  end
end
local IsInK1 = function(self, id)
  return table.hasvalue(self.hash1, id)
end
local IsInK2 = function(self, id)
  return table.hasvalue(self.hash2, id)
end
local GetCampIdList = function(self)
  local list = table.values(self.dict1)
  table.sort(list)
  return list
end
local GetCampId = function(self, lotteryId)
  return self.dict1[lotteryId]
end
local GetCampName = function(self, campId)
  return "Todo:CampName" .. campId
end
local GetCampIconName = function(self, campId)
  return self.dict2[campId] or ""
end
RecruitDisplayConfig.__init = __init
RecruitDisplayConfig.__delete = __delete
RecruitDisplayConfig.Init = Init
RecruitDisplayConfig.IsInK1 = IsInK1
RecruitDisplayConfig.IsInK2 = IsInK2
RecruitDisplayConfig.GetCampIdList = GetCampIdList
RecruitDisplayConfig.GetCampId = GetCampId
RecruitDisplayConfig.GetCampName = GetCampName
RecruitDisplayConfig.GetCampIconName = GetCampIconName
return RecruitDisplayConfig
