using Godot;

namespace ReactorMaintenance.Godot.Controls;

public partial class InventoryStrip : HBoxContainer
{
    public override void _Ready()
    {
        AddChild(CreateItem("Fuel Neutralizer", 2));
        AddChild(CreateItem("Coolant Neutralizer", 2));
        AddChild(CreateItem("Electric Neutralizer", 1));
        AddChild(CreateItem("Heat Shield", 1));
    }

    private static Label CreateItem(string name, int count)
    {
        return new() {
            Text = $"{name}: {count}",
            HorizontalAlignment = HorizontalAlignment.Center,
            SizeFlagsHorizontal = SizeFlags.ExpandFill
        };
    }
}