using Godot;
using ReactorMaintenance.Godot.Data;

namespace ReactorMaintenance.Godot.Screens;

public partial class CampaignIntro : ScreenBase
{
    public void Configure(AppController app, CampaignLevel level, int levelNumber, int levelCount)
    {
        var body = CreatePage(level.Name);
        body.Alignment = BoxContainer.AlignmentMode.Center;
        body.AddChild(CreateBodyText($"Campaign level {levelNumber} / {levelCount}"));
        body.AddChild(CreateBodyText(level.FlavorText));

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