using Godot;

namespace ReactorMaintenance.Godot.Screens;

public partial class MainMenu : ScreenBase
{
    public void Configure(AppController app, bool hasContinue)
    {
        var body = CreatePage("Reactor Maintenance");
        body.Alignment = BoxContainer.AlignmentMode.Center;

        var commands = new VBoxContainer {
            CustomMinimumSize = new(320, 0),
            SizeFlagsHorizontal = SizeFlags.ShrinkCenter
        };
        body.AddChild(commands);

        commands.AddChild(CreateButton("New Campaign", app.StartNewCampaign));
        commands.AddChild(CreateButton("Continue Campaign", app.ContinueCampaign, "No campaign progress exists yet.", !hasContinue));
        commands.AddChild(CreateButton("Play Random Level", app.StartRandomLevel));
        commands.AddChild(CreateButton("Options", app.ShowOptions));
        commands.AddChild(CreateButton("Tutorial", app.ShowTutorial));

        body.AddChild(CreateBodyText("Godot frontend prototype"));
    }
}