using NodePipeline.Engine.CodeGeneration.Abstractions;
using NodePipeline.Engine.Tests.CodeGeneratorTests.Fixtures.MockNodes;

namespace NodePipeline.Engine.Tests.CodeGeneratorTests.Fixtures;

internal class TestNodeModelFactory
{
    internal static NodeModelBuilder.NodesModel CreateMultipleNodesModel()
    {
        return new NodeModelBuilder.NodesModel([
            OneParameterNode.GetDescriptor(),
            OneParameterWithoutParameterlessConstructorNode.GetDescriptor(),
            NodeWithoutParameterlessConstructor.GetDescriptor(),
            OneInputPortSimpleNode.GetDescriptor(),
            OneInputAndOneOutputPortSimpleNode.GetDescriptor(),
            OneInputAndOneOutputPortSimpleNode.GetDescriptor()
        ]);
    }

    internal static NodeModelBuilder.NodesModel CreateThreeParameterNodeModel()
    {
        return new NodeModelBuilder.NodesModel([ThreeParameterNode.GetDescriptor()]);
    }

    internal static NodeModelBuilder.NodesModel CreateThreePortNodeWithReferenceAndStructInputsModel()
    {
        return new NodeModelBuilder.NodesModel([ThreePortNodeWithReferenceAndStructInputs.GetDescriptor()]);
    }

    internal static NodeModelBuilder.NodesModel CreateSimpleNamedNodeModel()
    {
        return new NodeModelBuilder.NodesModel([SimpleNamedNode.GetDescriptor()]);
    }

    internal static NodeModelBuilder.NodesModel CreateThreePortNodeModel()
    {
        return new NodeModelBuilder.NodesModel([ThreePortNode.GetDescriptor()]);
    }

    internal static NodeModelBuilder.NodesModel CreateThreePortNode2Model()
    {
        return new NodeModelBuilder.NodesModel([ThreePortNode2.GetDescriptor()]);
    }

    internal static NodeModelBuilder.NodesModel CreateMultipleNodesWithEnumParametersModel()
    {
        return new NodeModelBuilder.NodesModel([
            OneParameterNode.GetDescriptor(),
            OneInputPortSimpleNode.GetDescriptor(),
            NodeWithEnumParameter1.GetDescriptor(),
            OneInputAndOneOutputPortSimpleNode.GetDescriptor(),
            NodeWithEnumParameter2.GetDescriptor(),
            OneEnumParameterNode.GetDescriptor()
        ]);
    }

    internal static NodeModelBuilder.NodesModel CreateMultipleNodesWithNumericParameterBoundsConstraints()
    {
        return new NodeModelBuilder.NodesModel([
            ThreeParameterNode.GetDescriptor(),
            ThreeParameterNode2.GetDescriptor(),
            ThreeParameterNode3.GetDescriptor()
        ]);
    }

    internal static NodeModelBuilder.NodesModel CreateMultipleNodesWithStringParameterLengthConstraints()
    {
        return new NodeModelBuilder.NodesModel([
            ThreeParameterNode.GetDescriptor(),
            ThreeParameterNode2.GetDescriptor(),
            ThreeParameterNode3.GetDescriptor()
        ]);
    }
}