using Cryville.EEW.Colors;
using Cryville.EEW.Core.Colors;
using Cryville.EEW.FERegion;
using Cryville.EEW.Map;
using Cryville.EEW.Report;
using Cryville.EEW.TTS;
using System;
using System.Drawing;

namespace Cryville.EEW.Unity {
	sealed class SharedSettings : IRVMGeneratorContext, IMapGeneratorContext, ITTSMessageGeneratorContext {
		static SharedSettings s_instance;
		public static SharedSettings Instance => s_instance ??= new();

		public ISeverityScheme SeverityScheme => DefaultSeverityScheme.Instance;
		public ISeverityColorMapping SeverityColorMapping => DefaultSeverityColorMapping.Instance;
		public bool UseContinuousColor => true;
		public IColorScheme ColorScheme => new SeverityBasedColorScheme(SeverityScheme, DefaultSeverityColorMapping.Instance);
		public ISubColorScheme BorderColorScheme => new WrappedColorScheme(new SeverityBasedColorScheme(SeverityScheme, DefaultSeverityColorMapping.SecondaryInstance));
		public ISubColorScheme TextColorScheme => new DefaultTextColorScheme(Color.White, Color.Black);
		public ILocationConverter LocationConverter => new FERegionLongConverter();
		public TimeSpan NowcastWarningDelayTolerance => TimeSpan.MaxValue;
	}
}
