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

namespace SimplifyXR
{
    public class ActionButton : MonoBehaviour
    {

        public GameObject playIcon;
        public GameObject pauseIcon;
        public GameObject rewindIcon;

        public void UpdateIconByState(VideoPanelState state)
        {
            ResetIcons();

            switch(state)
            {
                case VideoPanelState.Paused:
                    playIcon.SetActive(true);
                    break;
                case VideoPanelState.Playing:
                    pauseIcon.SetActive(true);
                    break;
                case VideoPanelState.Finished:
                    rewindIcon.SetActive(true);
                    break;
            }

        }


        private void ResetIcons()
        {
            playIcon.SetActive(false);
            pauseIcon.SetActive(false);
            rewindIcon.SetActive(false);
        }

    }

}

