using System;
using System.Collections.Generic;

namespace eagle {
    using ProvinceId = Int32;

    public class CommandWarningPanelController : PopupPanelController {
        public void SetWarning(string title, string text) {
            PopupInfos = new List<PopupInfo> { new PopupInfo {
                titleText = title,
                mainText = text,
                affectedProvinceIds = new List<ProvinceId>()
            } };
            SetUpPanel();
        }

        public void ClearWarning() {
            if (PopupInfos.Count > 0) {
                PopupInfos.Clear();
                SetUpPanel();
            }
        }
    }
}