using MaterialSkin.Core.Controls;
using VisionBuilder.UI.Common.Services;

namespace VisionBuilder.UI.Windows.Settings;

public class WindowsPasswordInputService: IPasswordInputService
{
    public Task<string?> GetPasswordAsync()
    {
        if (MaterialInputBox.Prompt("Password required", "", out var password, true) == DialogResult.OK)
        {
            return Task.FromResult<string?>(password);
        }
        else
        {
            return Task.FromResult<string?>(null);
        }
    }
}