using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Maths;

namespace Content.Client.Traitor.Uplink
{
    [GenerateTypedNameReferences]
    public sealed partial class UplinkListingControl : Control
    {

        public UplinkListingControl(string itemName, string itemDescription,
            int itemPrice, bool canBuy, Texture? texture = null)
        {
            RobustXamlLoader.Load(this);

            UplinkItemName.Text = itemName;
            UplinkItemDescription.SetMessage(itemDescription);

            UplinkItemBuyButton.Text = $"{itemPrice} TC";
            UplinkItemBuyButton.Disabled = !canBuy;

            UplinkItemTexture.Texture = texture;
        }
    }
}
