using System;
using Net.Eagle0.Eagle.Api;
using TMPro;

namespace eagle {
    using ProvinceId = Int32;

    public class FeastCommandSelector : CommandSelector {
        public override AvailableCommand.SealedValueOneofCase CommandType =>
                AvailableCommand.SealedValueOneofCase.FeastCommand;
        public override string HeaderString => "Feast";
        public override string CommitButtonString => "Commit Feast";

        public TMP_Text GoldCostLabel;

        private FeastAvailableCommand FeastAvailableCommand => _availableCommand.FeastCommand;
        private ProvinceId ActingProvinceId => FeastAvailableCommand.ActingProvinceId;

        public override SelectedCommand Command =>
                new() { FeastCommand = new FeastSelectedCommand() };

        protected override void SetUpUI() {
            GoldCostLabel.text = _availableCommand.FeastCommand.GoldCost.ToString();
        }
    }
}
