using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Xml.Linq;
using UnityEngine;
using UnityEngine.Rendering;
using Utils;

namespace Data
{
    public class DefineManager:Utils.Singleton<DefineManager>
    {
        
        static readonly string[] dataSetFilePath = { "Data", "Mod" };
        const string coreNamespace = "Data";
        
        public Dictionary<string, Dictionary<string, Define>> defines = new();
        public Dictionary<string, DefinePack> packs = new();
        
        public void Init()
        {
            var packFolder = Directory.GetDirectories(dataSetFilePath[0]);
            foreach (var folder in packFolder)
            {
                var pack=new DefinePack();
                if (pack.LoadPack(folder))
                {
                    packs.Add(pack.packID, pack);
                }
            }
        }
    }
    
}