"""
Grid Editor API — barrel re-export.

The actual endpoints live in:
  - grid_editor_api_grid.py   (build-grid, rerun-ocr, save-grid, get-grid)
  - grid_editor_api_gutter.py (gutter-repair, gutter-repair/apply)
  - grid_editor_api_box.py    (build-box-grids)
  - grid_editor_api_unified.py (build-unified-grid, unified-grid)

This module re-exports the combined router and key symbols so that
existing `from grid.editor.api import router` / `from grid.editor.api import _build_grid_core`
continue to work unchanged.
"""

from fastapi import APIRouter

from .api_grid import router as _grid_router
from .api_gutter import router as _gutter_router
from .api_box import router as _box_router
from .api_unified import router as _unified_router

# Re-export _build_grid_core so callers that do
# `from grid.editor.api import _build_grid_core` keep working.
from grid.build.core import _build_grid_core  # noqa: F401

# Merge all sub-routers into one combined router
router = APIRouter()
router.include_router(_grid_router)
router.include_router(_gutter_router)
router.include_router(_box_router)
router.include_router(_unified_router)
