using System.IO;

namespace Machinations
{
    public static class MachinationsVariables
    {
        public const string DefaultComponentsDirectory = "Components/";
        public const string UserComponentInitName = "InitComponent";
        public const string ComponentTemplate = "ComponentTemplate";

        public const string CardsInitName = "InitCards";
        public const string CardsTemplate = "CardsTemplate";

        private static string m_componentsDirectory;

        //public static event Action ComponentDirectoryChanged;

        public static string ComponentsDirectory
        {
            get
            {
                return string.IsNullOrEmpty(m_componentsDirectory) || !Directory.Exists(m_componentsDirectory) ? DefaultComponentsDirectory : m_componentsDirectory;
            }
            set
            {
                if (m_componentsDirectory != value)
                {
                    m_componentsDirectory = value;
                    //ComponentDirectoryChanged?.Invoke();
                }
            }
        }
    }
}
