﻿using RacePredictor.Db.Models;
using System;

namespace RacePredictor.Scraping.Scrapers
{
    public class ScraperResolver : IScraperResolver
    {
        private readonly ZnookScraper _znookScraper;

        public ScraperResolver(ZnookScraper znookScraper)
        {
            _znookScraper = znookScraper;
        }

        public IScraper Resolve(Organizer organizer)
        {
            switch (organizer)
            {
                case Organizer.Znook:
                    return _znookScraper;
            }

            throw new Exception($"Organizer {organizer} scraper does not exist.");
        }
    }
}
