using NodePipeline.Abstractions.Attributes;
using NodePipeline.Abstractions.Interfaces.Nodes;
using NodePipeline.Abstractions.Models;
using NodePipeline.Engine.CodeGeneration.Abstractions.Models;

namespace NodePipeline.Engine.Tests.CodeGeneratorTests.Fixtures.MockNodes;

public struct TestStruct1
{
    public int IntValue { get; set; }
}

public class TestClass1
{
    public int IntValue { get; set; }
}

public class ThreePortNodeWithReferenceAndStructInputs : INode
{
    [NodeField(FieldDirection.Input)] public NodeField<TestStruct1> StructInput { get; set; } = null!;

    [NodeField(FieldDirection.Input)] public NodeField<TestClass1> ClassInput { get; set; } = null!;

    [NodeField(FieldDirection.Output)] public NodeField<bool> Output { get; set; } = null!;

    public void Execute()
    {
        throw new NotImplementedException();
    }

    internal static NodeDescriptor GetDescriptor()
    {
        return new NodeDescriptor(nameof(ThreePortNode), false, typeof(ThreePortNode).FullName!,
            typeof(ThreePortNode).FullName!,
            [
                new NodeFieldDescriptor(nameof(StructInput), nameof(StructInput), typeof(int).FullName!, false, false,
                    false,
                    FieldDirection.Input, null),
                new NodeFieldDescriptor(nameof(ClassInput), nameof(ClassInput), typeof(string).FullName!, false, true,
                    false,
                    FieldDirection.Input, null),
                new NodeFieldDescriptor(nameof(Output), nameof(Output), typeof(bool).FullName!, false, false, false,
                    FieldDirection.Output, null)
            ], true, null);
    }
}