"""
Build TA API (typed) with .tpa, .document, .stack endpoint groups.
Uses the typed group classes from _typed_ta and wires the generated client with header injection.
"""

from __future__ import annotations

from collections.abc import Callable, MutableMapping
from stax_sdk.ta._typed_ta import TaAPI


def build_ta_sync_api(
    base_url: str,
    inject_headers: Callable[[MutableMapping[str, str]], None] | None = None,
) -> TaAPI:
    """Build the TA sync API (prefer constructing TaAPI(...) directly)."""
    return TaAPI(base_url=base_url, inject_headers=inject_headers)
