using Microsoft.Extensions.Logging;

namespace YTExtractor.Services.Handlers
{
    public abstract class YoutubeServiceHandler
    {
        protected readonly ILogger _logger;
        protected YoutubeServiceHandler? _nextHandler;

        protected YoutubeServiceHandler(ILogger logger)
        {
            _logger = logger;
        }

        public YoutubeServiceHandler SetNext(YoutubeServiceHandler handler)
        {
            _nextHandler = handler;
            return handler;
        }

        public abstract Task<YtDlpInfo> HandleVideoInfo(string url, string workingDir);
        
        public abstract Task<string> HandleSubtitles(string url, string language, string workingDir);
    }
}