using Godot;
namespace Theriapolis.GodotHost.Scenes;
///
/// Character creation wizard shell. Mirrors src/app.jsx per
/// GODOT_PORTING_GUIDE.md §4: header + stepper + page (step + aside) +
/// nav bar. Owns the resource and dispatches
/// each step's content into the StepHost.
///
/// Default theme only at this layer — per guide §12 (build order),
/// the parchment Theme lands as a final pass once structural correctness
/// is verified. Until then, font/colour issues are clearly font/colour
/// issues, not layout issues.
///
public partial class Wizard : Control
{
[Signal] public delegate void BackToTitleEventHandler();
private static readonly string[] StepKeys =
{ "clade", "species", "class", "subclass", "background", "stats", "skills", "review" };
private static readonly string[] StepNames =
{ "Clade", "Species", "Calling", "Subclass", "History", "Abilities", "Skills", "Sign" };
public UI.CharacterDraft Character { get; private set; } = null!;
private UI.Widgets.CodexStepper _stepper = null!;
private Control _stepHost = null!;
private Label _folioLabel = null!;
private Label _validation = null!;
private Label _navProgress = null!;
private Button _backBtn = null!;
private Button _nextBtn = null!;
private int _step;
private Steps.IStep? _activeStep;
private static readonly System.Type?[] StepTypes =
{
typeof(Steps.StepClade), // 0 Clade — implemented
null, // 1 Species
null, // 2 Calling
null, // 3 Subclass
null, // 4 History
null, // 5 Abilities
null, // 6 Skills
null, // 7 Sign
};
public override void _Ready()
{
Character = new UI.CharacterDraft();
_stepper = GetNode("%Stepper");
_stepHost = GetNode("%StepHost");
_folioLabel = GetNode