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

public class HandleSettingsPanel : MonoBehaviour
{
    public ScrollRect HandleVisibilityToggles;
    public List<BoneTags> AvailableTags = new List<BoneTags>();

    private void Start()
    {
        var handleManager = HandleManager.Instance;
        foreach (BoneTags en in AvailableTags)
        {
            var handle = SliderPanel.CreateToggle(en.ToString(), handleManager.EnabledHandles.Contains(en), HandleVisibilityToggles.content, (value)=>
            {
                if (value)
                {
                    handleManager.EnabledHandles.Add(en);
                }
                else
                {
                    handleManager.EnabledHandles.Remove(en);
                }
            });
        }
    }
}
