using System.Globalization;
using NodePipeline.Abstractions.Interfaces;
using NodePipeline.Abstractions.Interfaces.Nodes;
using NodePipeline.Abstractions.Interfaces.Validation;
using NodePipeline.Abstractions.Models.Validation;

namespace NodePipeline.Abstractions.Validators;

public abstract class NodeFieldValidatorBase<T>(IPipelineLocalizationProvider localizer) : INodeFieldValidator<T>
{
    protected readonly CultureInfo Culture = CultureInfo.CurrentCulture;
    protected readonly IPipelineLocalizationProvider Localizer = localizer;

    protected NodeFieldValidationResult SuccessResult => new(ValidationResult.Valid, null);

    public abstract NodeFieldValidationResult Validate(INodeField<T> nodeField);
}