using System.Collections.Generic;
using NodePipeline.Abstractions.Models.Validation;
using NodePipeline.Abstractions.Validators;

namespace NodePipeline.Abstractions.Interfaces.Validation;

/// <summary>
///     For implementation use <see cref="NodeValidatorBase" />
/// </summary>
public interface INodeValidator
{
    /// <summary>
    ///     Dictionary of node parameter names and values
    /// </summary>
    /// <param name="nodeFields"></param>
    /// <param name="fieldResults"></param>
    /// <param name="portResults"></param>
    /// <returns></returns>
    NodeValidationResult Validate(Dictionary<string, object> nodeFields,
        IReadOnlyDictionary<string, List<NodeFieldValidationResult>> fieldResults,
        Dictionary<string, List<NodeFieldValidationResult>> portResults);
}