"""OGImage tool — direct canvas generation and managed LLM OG images.

Two flows:

**Direct** (fast, ~300ms, no LLM cost)::

    img = client.ogimage.generate("My Article Title", method="direct")
    print(img.image_url)  # CDN URL, ready immediately

**Managed LLM** (async, permanent slug URL)::

    managed = client.ogimage.create_managed(
        slug="homepage-hero",
        title="Homepage Hero",
        description="Modern SaaS landing page",
    )
    print(managed.stable_url)  # embed in <meta og:image> once, forever
    # poll until completed:
    while True:
        status = client.ogimage.get_managed("homepage-hero")
        if status.status == "completed":
            print(status.cdn_url)
            break
"""
from __future__ import annotations

from ._resource import AsyncOGImageResource, OGImageResource
from ..._api.generated.ogimage.ogimage__api__ogimage.models import (
    OGImageGenerateRequest,
    OGImageResponse,
    OGImageAsyncResponse,
    OGImageStatus,
    OGImagePreset,
    OGImagePresetRequest,
    PatchedOGImagePresetRequest,
    PaginatedOGImageResponseList,
    PaginatedOGImagePresetList,
)
from ..._api.generated.ogimage.ogimage__api__ogimage_managed.models import (
    OGImageManagedCreateRequest,
    OGImageManagedResponse,
    OGImageManagedRegenerateResponse,
    PatchedOGImageManagedPatchRequest,
)
from ..._api.generated.ogimage.enums import (
    OGImageGenerateRequestMethod,
    OGImageGenerateRequestStyle,
    OGImageGenerateRequestSize,
    OGImageManagedResponseStatus,
    OGImageManagedResponseMethod,
    OGImagePresetStyle,
)

# Alias for backward compatibility (tools/__init__.py uses OGImageResponseStatus)
OGImageResponseStatus = OGImageManagedResponseStatus

__all__ = [
    "OGImageResource",
    "AsyncOGImageResource",
    # Request models
    "OGImageGenerateRequest",
    "OGImageManagedCreateRequest",
    "PatchedOGImageManagedPatchRequest",
    "OGImagePresetRequest",
    "PatchedOGImagePresetRequest",
    # Response models
    "OGImageResponse",
    "OGImageAsyncResponse",
    "OGImageStatus",
    "OGImageManagedResponse",
    "OGImageManagedRegenerateResponse",
    "OGImagePreset",
    "PaginatedOGImageResponseList",
    "PaginatedOGImagePresetList",
    # Enums
    "OGImageGenerateRequestMethod",
    "OGImageGenerateRequestStyle",
    "OGImageGenerateRequestSize",
    "OGImageManagedResponseStatus",
    "OGImageManagedResponseMethod",
    "OGImagePresetStyle",
    "OGImageResponseStatus",  # alias
]
