using Godot;
using ReactorMaintenance.Godot.Data;

namespace ReactorMaintenance.Godot.Screens;

public partial class GenerationScreen : ScreenBase
{
    public void Configure(AppController app, CampaignLevel level)
    {
        var body = CreatePage("Random Level");
        body.Alignment = BoxContainer.AlignmentMode.Center;
        body.AddChild(CreateBodyText(level.FlavorText));
        body.AddChild(CreateBodyText($"Future level JSON: {level.LevelPath}"));

        var actions = new HBoxContainer { SizeFlagsHorizontal = SizeFlags.ShrinkCenter };
        body.AddChild(actions);
        actions.AddChild(CreateButton("Begin", app.LoadCurrentLevel));
        actions.AddChild(CreateButton("Back", app.ShowMainMenu));
    }
}