using StubCore.Entities.Response;
using System.Collections.Generic;

namespace StubCore.Configuration
{
    public static class ConfigManager
    {
        public static ConfigSet GetConfig(string key)
        {
            var _config = Configuration.DatabaseFolders;
            return CreateConfigSet(_config, key);
        }

        public static ConfigSet GetOptions(string key)
        {
            var _config = Configuration.Options;
            return CreateConfigSet(_config, key);
        }

        private static ConfigSet CreateConfigSet(Dictionary<string, string> _config, string key)
        {
            return new ConfigSet
            {
                folder = key,
                file = _config[key] + "." + Configuration.DataType
            };
        }
    }
}