using Valg.EVA.Skanning.ContainerExtensions;
using Valg.EVA.Skanning.UserInterfaceElements.UserSettings;

namespace Valg.EVA.Skanning.UserInterfaceElements.Language
{
    public class LanguageUIInitiator : IStartableComponent
    {
        private readonly IUserSettingsProvider userSettingsProvider;
        private readonly ILanguageManager languageManager;

        public LanguageUIInitiator(IUserSettingsProvider userSettingsProvider, ILanguageManager languageManager)
        {
            this.userSettingsProvider = userSettingsProvider;
            this.languageManager = languageManager;
        }

        public void Start()
        {
            languageManager.SetGuiLanguage(userSettingsProvider.GetUserSettings().Language);
        }
    }
}
