using GraphicsManager.Objects;
using Luski.Classes;
using Luski.GUI.MainScreen.UI.LuskiSettings.Core;
using Luski.GUI.MainScreen.UI.SettingsPanel;

namespace Luski.GUI.MainScreen.UI.LuskiSettings.Pages.AdvancedSettings;

public class ExperimentSettings : PageFlow
{
    public ExperimentSettings()
    {
        base.Size = new(500.ScaleInt());
        PageName = "Experiments";
        ExperimentGUI? g = null;
        foreach (ExperimentInfo exp in Globals.Experiments)
        {
            g = new(exp);
            Controls.Add(g);
        }

        if (g is not null)
        {
            g.line.WindowLoaded += _ =>
            {
                ParentResize(new(Globals.ms.ClientSize));
                return Task.CompletedTask;
            };
        }
    }
}