using NodePipeline.Application.Nodes;

namespace NodePipeline.Application;

public class FileNameProvider : IFileNameProvider
{
    private readonly Queue<string> _queue = [];

    public string GetNextFileName()
    {
        return _queue.TryDequeue(out var filePath)
            ? filePath
            : throw new Exception("Nothing to read");
    }

    public void AddNext(string filePath)
    {
        _queue.Enqueue(filePath);
    }
}