from typing import Dict, Any
from .base import SourceAdapter
from .local import LocalAdapter

ADAPTER_MAP = {
    "local": LocalAdapter,
}

def get_adapter(source_type: str, config: Dict[str, Any]) -> SourceAdapter:
    adapter_class = ADAPTER_MAP.get(source_type)
    if not adapter_class:
        raise ValueError(f"Unknown source type: {source_type}")
    return adapter_class(config)
