diff --git a/src/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardCallbackData.cs b/src/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardCallbackData.cs new file mode 100644 index 0000000..fb208ed --- /dev/null +++ b/src/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardCallbackData.cs @@ -0,0 +1,25 @@ +using System; + +namespace GmRelay.Bot.Features.Sessions.CreateSession.Wizard; + +public static class WizardCallbackData +{ + public const string Prefix = "wizard"; + + public static string Choice(string step, string choice) => $"{Prefix}:{step}:{choice}"; + public static string Back() => $"{Prefix}:back"; + public static string Cancel() => $"{Prefix}:cancel"; + public static string Create() => $"{Prefix}:create"; + + public static bool TryParse(string? data, out string action, out string step, out string choice) + { + action = step = choice = string.Empty; + if (string.IsNullOrEmpty(data)) return false; + var parts = data.Split(':', 3); + if (parts.Length < 2 || parts[0] != Prefix) return false; + action = parts[1]; + step = parts.Length >= 3 ? parts[1] : string.Empty; + choice = parts.Length >= 3 ? parts[2] : string.Empty; + return true; + } +} diff --git a/src/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardStepNames.cs b/src/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardStepNames.cs new file mode 100644 index 0000000..200fdc2 --- /dev/null +++ b/src/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardStepNames.cs @@ -0,0 +1,24 @@ +namespace GmRelay.Bot.Features.Sessions.CreateSession.Wizard; + +public static class WizardStepNames +{ + public const string Type = "Type"; + public const string Title = "Title"; + public const string Description = "Description"; + public const string Cover = "Cover"; + public const string System = "System"; + public const string Duration = "Duration"; + public const string DateTime = "DateTime"; + public const string Capacity = "Capacity"; + public const string Visibility = "Visibility"; + public const string PickClub = "PickClub"; + public const string Publish = "Publish"; + public const string Confirm = "Confirm"; + + // Pool steps + public const string PoolSystemDuration = "PoolSystemDuration"; + public const string PoolAddSlots = "PoolAddSlots"; + public const string PoolSlotDateTime = "PoolSlotDateTime"; + public const string PoolSlotCapacity = "PoolSlotCapacity"; + public const string PoolConfirm = "PoolConfirm"; +}