using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace SimplifyXR
{

    [DirectiveCategory(DirectiveCategories.Action,
        subCategory = DirectiveSubCategory.UI,
        directiveInfo = "This <i>action</i> sets and displays image(s) in the simpleAR Pro Standard Image Panel.",
        prettyName = "Set Panel Images")]
    public class SetPanelImages : Actions
    {
        public ImagePanelFeatures imagePanel;
        public List<ImagePanelContent> panelContent;

        public override List<KnobKeywords> ReceiveKeywords()
        {
            return new List<KnobKeywords>();
        }

        public override List<KnobKeywords> SendKeywords()
        {
            return new List<KnobKeywords>();
        }

        public override void Execute()
        {
            imagePanel =
                imagePanel == null ? 
                Object.FindObjectOfType<ImagePanelFeatures>() :
                imagePanel;
            imagePanel?.SetImages(panelContent);
            ThisActionCompleted();
        }
    }
}
