using System.Collections.Generic; using UnityEngine; using NEG.UI.Popup; using NEG.UI.UnityUi.WindowSlot; using NEG.UI.Window; using NEG.UI.WindowSlot; namespace NEG.UI.Area { public class MonoArea : MonoBehaviour, IArea { public IEnumerable AvailableSlots => windowSlots; public IWindowSlot DefaultWindowSlot => windowSlots[0]; public IEnumerable CurrentWindows { get; } [SerializeField] private List windowSlots; [SerializeField] private Queue currentPopups = new(); public void SetEnabled(bool setEnabled) => gameObject.SetActive(setEnabled); public void OpenWindow(IWindow window, object data = null) { DefaultWindowSlot.AttachWindow(window); window.SetData(data); } } }