using System;
using System.Collections.Generic;
using Assets.Source.Core.Interfaces;

namespace Assets.Source.UI
{
    public interface IUIElement : IMonoBehaviour
    {
        string ExplicitID { get; }
        bool OpenedInitially { get; }
        bool PreventAutoClose { get; }
        List<IUIElement> ConnectedElements { get; }
        void Open(IUIElementProperties properties = null, bool instantly = false);
        void Close(bool instantly = false);
        void AddConnectedElement(IUIElement e);

        event Action OnOpenStart;
        event Action OnCloseStart;
        event Action OnOpenEnd;
        event Action OnCloseEnd;
    }
}
