using Assets.Source.UI;
using UnityEngine;

namespace Assets.Source.Content.UI.Components
{
    public class WindowCaller : MonoBehaviour
    {
        public UIElementBase TargetWindowPrefab;

        public void OpenTargetWindow()
        {
            Get.MainUI?.Open(TargetWindowPrefab.GetType(), TargetWindowPrefab.ExplicitID);
        }

        public void CloseTargetWindow()
        {
            Get.MainUI?.TryClose(TargetWindowPrefab.GetType(), TargetWindowPrefab.ExplicitID);
        }
    }
}
