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>confirm or reset Object Anchor Alignment</b> after placement.",
        prettyName = "Set Object Anchor Alignment Option")]
    public class SetObjectAnchorAlignmentOption : Actions
    {
        public ObjectAnchorPanelFeatures objectAnchorPanel;

        [Tooltip("Customizeable properties for the object anchor.")]
        public bool  confirmObjectAnchorAlignment = 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?.OnAlignmentConfirm(confirmObjectAnchorAlignment);
            ThisActionCompleted();
        }
    }
}

