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

namespace SimplifyXR
{

    [DirectiveCategory(DirectiveCategories.Action,
        subCategory = DirectiveSubCategory.UI,
        directiveInfo = "This <i>action</i> triggers a <b>multiple choice selection</b> of the active multiple choice in the simpleAR Standard Instruction Panel.",
        prettyName = "Select Instructional Multiple Choice")]
    public class SelectMultipleChoiceAction : Actions
    {
        public simpleARInstructionFeatures instructionPanel;
        InstructionMultipleChoice multipleChoice;

        [Tooltip("Customizeable properties for the multiple choice select.")]
        public bool selectRight;
        

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

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

        public override void Execute()
        {
            instructionPanel =
                instructionPanel == null ?
                Object.FindObjectOfType<simpleARInstructionFeatures>() :
                instructionPanel;

            multipleChoice = instructionPanel?.GetComponentInChildren<InstructionMultipleChoice>();

            multipleChoice?.SelectMultipleChoice(selectRight);
            ThisActionCompleted();
        }
    }
}

