using Ninject;
using VisionBuilder.UI.Common;
using VisionBuilder.UI.Common.Processing;
using VisionBuilder.UI.Common.Services;
using VisionBuilder.UI.Common.ViewModel.Interfaces.UI;
using VisionBuilder.UI.Avalonia.Services;

namespace VisionBuilder.UI.Avalonia;

public static class ModuleExtensions
{
    public static IKernel UseAvaloniaServices(this IKernel self)
    {
        self.Bind<ISettingsService>().To<AvaloniaSettingsService>().InSingletonScope();
        self.Bind<ILoadingService>().To<AvaloniaLoadingService>().InSingletonScope();
        self.Bind<IRecipeSelectionDialogService>().To<AvaloniaRecipeSelectionDialogService>().InSingletonScope();
        self.Bind<IImagePreviewService>().To<AvaloniaImagePreviewService>().InSingletonScope();
        self.Bind<IPasswordInputService>().To<AvaloniaPasswordInputService>().InSingletonScope();
        self.Bind<AvaloniaUISettings, ISettings>().To<AvaloniaUISettings>().InSingletonScope();
        return self;
    }
}
