"""Web Search tool — synchronous and asynchronous search resources.

Provides AI-powered web search with LLM synthesis, async job queuing,
mode-based depth control, and URL fetch/analysis.

Example::

    from sdkrouter import SDKRouter

    client = SDKRouter(api_key="sk_live_xxx")

    # Instant LLM-powered search
    result = client.search.query("latest AI developments")
    print(result.content)

    # Async mode-based search (fire and wait)
    ranked = client.search.query_async(
        "Python best practices",
        mode=SearchMode.RESEARCH,
        wait=True,
    )
    print(ranked.summary)
"""

from __future__ import annotations

from ._resource import AsyncSearchResource, SearchResource
from ..._api.generated.search.search__api__search.models import (
    SearchQueryRequest,
    URLFetchRequest,
    LLMSearchResponse,
    Citation,
    UserLocationRequest,
    SearchRequestList,
    SearchAsyncRequestRequest,
    SearchAsyncResponse,
    SearchJobStatus,
    RankedResults,
    SearchModeResponse,
    MetricsSummary,
    QueryDecomposition,
    Entities,
)
from ..._api.generated.search.enums import SearchAsyncRequestRequestMode

# Mode aliases for convenience
SearchMode = SearchAsyncRequestRequestMode

# Re-export UserLocation as alias for convenience
UserLocation = UserLocationRequest

__all__ = [
    "SearchResource",
    "AsyncSearchResource",
    # Mode enum
    "SearchMode",
    # Models
    "LLMSearchResponse",
    "Citation",
    "UserLocation",
    "SearchRequestList",
    "SearchQueryRequest",
    "URLFetchRequest",
    "UserLocationRequest",
    # Async job models
    "SearchAsyncRequestRequest",
    "SearchAsyncResponse",
    "SearchJobStatus",
    "RankedResults",
    # Full results model
    "SearchModeResponse",
    "MetricsSummary",
    "QueryDecomposition",
    "Entities",
]
