using Inspectron.Settings;
using Ninject;
using VisionBuilder.UI.Blazor.Services;
using VisionBuilder.UI.Common;
using VisionBuilder.UI.Common.Processing;
using VisionBuilder.UI.Common.Services;
using VisionBuilder.UI.Common.ViewModel.Interfaces.UI;
using ISettings = VisionBuilder.UI.Common.ISettings;

namespace VisionBuilder.UI.Blazor;

public static class ModuleExtensions
{
    public static IKernel UseBlazorServices(this IKernel self)
    {
        self.Bind<ISettingsService>().To<BlazorSettingsService>().InSingletonScope();
        self.Bind<ILoadingService>().To<BlazorLoadingService>().InSingletonScope();
        self.Bind<IRecipeSelectionDialogService>().To<BlazorRecipeSelectionDialogService>().InSingletonScope();
        self.Bind<IImagePreviewService>().To<BlazorImagePreviewService>().InSingletonScope();
        self.Bind<IPasswordInputService>().To<BlazorPasswordInputService>().InSingletonScope();
        self.Bind<BlazorUISettings, ISettings>().To<BlazorUISettings>().InSingletonScope();
        return self;
    }
}
