namespace InsiteCommerce.Web.Helpers
{
    using Insite.Core.Providers;
    using Microsoft.Extensions.Hosting;

#pragma warning disable CS0618
    public class DefaultDebugModeProvider : IDebugModeProvider
#pragma warning restore CS0618
    {
        public bool IsDebugEnabled => this.IsPreprocessorDebugEnabled;

        private bool IsPreprocessorDebugEnabled { get; }

        public DefaultDebugModeProvider()
        {
#if DEBUG
            this.IsPreprocessorDebugEnabled = true;
#endif
        }
    }

    public class WebHostEnvironment : IHostEnvironment
    {
        public bool IsDevelopment()
        {
#if DEBUG
            return true;
#else
            return false;
#endif
        }
    }
}
