local SConfigManager = {}

SConfigManager._config = nil

function SConfigManager:LoadConfig(configName, configPath)
    print(string.format("SConfigManager:LoadConfig configName:%s configPath:%s", configName, configPath))
    local jsonTextAsset = LoadResource(configPath)
    local jsonTable = self._jsonConvert:decode(jsonTextAsset.text)
    self._config[configName] = jsonTable
end

function SConfigManager:LoadAllConfig()
    -- For Example
    -- self:LoadConfig("configLinkGame", "LuaScripts/Config/ConfigLinkGame.json")
end

function SConfigManager:GetConfig(configName)
    return self._config[configName]
end

function SConfigManager:Init()
    self._config = {}

    self._jsonConvert = require("Base/json.lua")
    self:LoadAllConfig()
end

function SConfigManager:UnInit()
end

return SConfigManager