using System.Linq;
using Godot;

[SceneTree]
public partial class DaySchedule : PanelContainer
{
    [Export]
    private int _hoursInDay = 6;

    public override void _Ready()
    {
        TimeSlotContainer.GetChildren().ToList().ForEach(child => child.QueueFree());

        for (var i = 0; i < _hoursInDay; i++)
        {
            var timeSlot = Instantiator.Instantiate<TimeSlot>();

            TimeSlotContainer.AddChild(timeSlot);
        }
    }

    public void StartDay()
    {
        CurrentTimeLine.Running = true;
    }
}
