using NodePipeline.Abstractions.Interfaces.Nodes;

// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable UnassignedGetOnlyAutoProperty

#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
namespace NodePipeline.Engine.Tests.CodeGeneratorTests.Fixtures.NodeFields;

public class FakeField<T> : INodeField<T>
{
    public INodeField<T>? BoundTo { get; private set; }
    public Func<T>? RuntimeGetter { get; private set; }
    public string Name { get; }
    public string Description { get; }
    public string Code { get; }
    public T Value { get; set; }
    public FieldDirection Direction { get; }

    public void BindStatic(INodeField<T> from)
    {
        BoundTo = from;
    }

    public void BindRuntime(Func<T> getter, Action<T> setter)
    {
        RuntimeGetter = getter;
    }
}
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.