"""Multi-source document fetcher registry."""

from .base import SourceDocument, SourceFetcher
from .ietf import IETFFetcher
from .w3c import W3CFetcher

FETCHERS = {"ietf": IETFFetcher, "w3c": W3CFetcher}


def get_fetcher(source_name: str, config=None):
    cls = FETCHERS.get(source_name)
    if cls is None:
        raise ValueError(f"Unknown source: {source_name}")
    return cls(config)
