
using Godot;
using System.Collections.Generic;

namespace Rokojori
{  
  [Tool]
  [GlobalClass]
  public partial class CompositorVFXPreset:Resource
  {
    // [Export]
    // public CompositorVFXEffectPreset[] effectPresets = [];

    [Export]
    public RokojoriCompositorEffect[] effects = [];

    // [ExportToolButton( "Convert Old to New")]
    // public Callable convertOldToNewButton => Callable.From(
    //   ()=>
    //   {
    //     effects = effectPresets.Map( e => e.effect );

    //     for ( int i = 0; i < effectPresets.Length; i++ )
    //     {
    //       effects[ i ].animationTargets = effectPresets[ i ].targets.Map(
    //         ( et )=>
    //         {
    //           if ( et is CompositorEffectMemberCurveTarget target  )
    //           {
    //             var ct = new CompFXMemberCurveTarget();
    //             ct.member = target.member;
    //             ct.curve = target.curve;
    //             ct.targetType = 
    //               CompositorEffectMemberCurveTarget.TargetType.Int == target.targetType ? CompFXMemberCurveTarget.TargetType.Int :
    //               CompositorEffectMemberCurveTarget.TargetType.Bool == target.targetType ? CompFXMemberCurveTarget.TargetType.Bool :
    //               CompFXMemberCurveTarget.TargetType.Float;
                
    //             return ct;
    //           }

    //           return null;
    //         }
    //       );
    //     }

    //   }
    // );
  }
}