ryujinx/src/Ryujinx/Systems/SetupWizard/BaseSetupWizard.cs
2025-12-12 01:44:00 -06:00

30 lines
932 B
C#

using Avalonia.Controls.Presenters;
using Ryujinx.Ava.Common.Locale;
using System.Threading.Tasks;
namespace Ryujinx.Ava.Systems.SetupWizard
{
public abstract class BaseSetupWizard(ContentPresenter presenter)
{
/// <summary>
/// Define the logic and flow of this <see cref="BaseSetupWizard"/>.
/// </summary>
public abstract ValueTask Start();
protected ValueTask<bool> FirstPage()
{
SetupWizardPageBuilder builder = new(presenter, isFirstPage: true);
return builder
.WithTitle(LocaleKeys.SetupWizardFirstPageTitle)
.WithContent(LocaleKeys.SetupWizardFirstPageContent)
.WithActionContent(LocaleKeys.SetupWizardFirstPageAction)
.Show();
}
protected SetupWizardPageBuilder NextPage()
{
return new SetupWizardPageBuilder(presenter);
}
}
}