"""
EduSearch Seeds API Routes — Barrel Re-export.

Split into submodules:
- edu_search_models.py  — Pydantic request/response models
- edu_search_crud.py    — CRUD endpoints (list, get, create, update, delete, bulk import)
- edu_search_status.py  — Stats, export for crawler, crawl status feedback

CRUD operations for managing education search crawler seed URLs.
Direct database access to PostgreSQL.
"""

from fastapi import APIRouter

from .edu_search_crud import router as _crud_router, get_db_pool
from .edu_search_status import router as _status_router

# Re-export models for consumers that import types from this module
from .edu_search_models import (
    CategoryResponse,
    SeedBase,
    SeedCreate,
    SeedUpdate,
    SeedResponse,
    SeedsListResponse,
    StatsResponse,
    BulkImportRequest,
    BulkImportResponse,
    CrawlStatusUpdate,
    CrawlStatusResponse,
    BulkCrawlStatusUpdate,
    BulkCrawlStatusResponse,
)

# Combine both sub-routers into a single router for backwards compatibility.
# The consumer imports `from .edu_search_seeds import router as edu_search_seeds_router`.
router = APIRouter(prefix="/edu-search", tags=["edu-search"])
router.include_router(_crud_router)
router.include_router(_status_router)

__all__ = [
    "router",
    "get_db_pool",
    # Models
    "CategoryResponse",
    "SeedBase",
    "SeedCreate",
    "SeedUpdate",
    "SeedResponse",
    "SeedsListResponse",
    "StatsResponse",
    "BulkImportRequest",
    "BulkImportResponse",
    "CrawlStatusUpdate",
    "CrawlStatusResponse",
    "BulkCrawlStatusUpdate",
    "BulkCrawlStatusResponse",
]
