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 class OneInputAndOneOutputPortSimpleNode : INode
{
    [NodeField(FieldDirection.Input)] public NodeField<int> Input { get; set; } = null!;


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

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

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