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

namespace SimplifyXR
{

    [DirectiveCategory(DirectiveCategories.Action,
        subCategory = DirectiveSubCategory.UI,
        directiveInfo = "This <i>action</i> sets the option to <b>retain or remove an Object Anchor Model</b> after alignment.",
        prettyName = "Set Object Anchor Retain Model Option")]
    public class SetObjectAnchorRetainModelOption : Actions
    {
        public ObjectAnchorPanelFeatures objectAnchorPanel;

        [Tooltip("Customizeable properties for the object anchor.")]
        public bool  retainObjectAnchorModel = true;
        

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

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

        public override void Execute()
        {
            objectAnchorPanel = 
                objectAnchorPanel == null ? 
                Object.FindObjectOfType<ObjectAnchorPanelFeatures>() :
                objectAnchorPanel;
            objectAnchorPanel?.OnRetainModelConfirm(retainObjectAnchorModel);
            ThisActionCompleted();
        }
    }
}

