using UnityEngine;

namespace Jovian.PopupSystem.UI {
    /// <summary>
    /// Reference-only MonoBehaviour for a popup prefab. Holds serialized scene references
    /// to the content container, canvas group, and background. All behavior is in
    /// <see cref="PopupView"/>.
    /// </summary>
    public class PopupReference : MonoBehaviour {
        [SerializeField] RectTransform content;
        [SerializeField] CanvasGroup canvasGroup;
        [SerializeField] RectTransform background;

        /// <summary>The content RectTransform where popup elements are parented.</summary>
        public RectTransform Content => content;

        /// <summary>The CanvasGroup for fade animation control.</summary>
        public CanvasGroup CanvasGroup => canvasGroup;

        /// <summary>The background RectTransform that sizes to content.</summary>
        public RectTransform Background => background;
    }
}
