"""Dataset loaders."""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ..config import DatasetConfig

from .base import BaseDataset
from .synthetic import SyntheticDataset


def get_dataset(config: "DatasetConfig") -> BaseDataset:
    """Factory function to create dataset from config."""
    datasets = {
        "synthetic": SyntheticDataset,
        # "file": FileDataset,  # TODO: implement
    }
    
    dataset_cls = datasets.get(config.type)
    if not dataset_cls:
        raise ValueError(f"Unknown dataset type: {config.type}")
    
    return dataset_cls(config)


__all__ = ["BaseDataset", "SyntheticDataset", "get_dataset"]
