using System.Collections.Generic;

namespace FlutterCodeGenerator
{
    internal class GenerateDataCache
    {
        private static GenerateDataCache _instance;

        private ServiceMap _currentServiceMap;

        public static GenerateDataCache Instance => _instance ?? (_instance = new GenerateDataCache());

        public Dictionary<ComplexModelType, string> AlreadyGeneratedList { get; }

        public Dictionary<string, Dictionary<ModelType, int>> ConflictModelTypeList { get; }

        public GenerateDataCache()
        {
            AlreadyGeneratedList = new Dictionary<ComplexModelType, string>();
            ConflictModelTypeList = new Dictionary<string, Dictionary<ModelType, int>>();
        }

        public void SetCurrentServiceMap(ServiceMap serviceMap)
        {
            _currentServiceMap = serviceMap;
        }

        public ServiceMap GetCurrentServiceMap()
        {
            return _currentServiceMap;
        }
    }
}