using Godot;
using ReactorMaintenance.Godot.Data;

namespace ReactorMaintenance.Godot.Screens;

public partial class GameOverScreen : ScreenBase
{
    public void Configure(AppController app, CampaignLevel level)
    {
        var body = CreatePage("Game Over");
        body.Alignment = BoxContainer.AlignmentMode.Center;
        body.AddChild(CreateBodyText($"Failed level: {level.Name}"));

        var actions = new HBoxContainer { SizeFlagsHorizontal = SizeFlags.ShrinkCenter };
        body.AddChild(actions);
        actions.AddChild(CreateButton("Retry Current Level", app.RetryCurrentLevel));
        actions.AddChild(CreateButton("Main Menu", app.ShowMainMenu));
    }
}