"""The `llm.messages.content` module."""

from typing import TypeAlias

from ..types import Jsonable
from .audio import Audio, Base64AudioSource
from .document import (
    Base64DocumentSource,
    Document,
    TextDocumentSource,
    URLDocumentSource,
)
from .image import Base64ImageSource, Image, ImageMimeType, URLImageSource
from .text import Text, TextChunk, TextEndChunk, TextStartChunk
from .thought import Thought, ThoughtChunk, ThoughtEndChunk, ThoughtStartChunk
from .tool_call import ToolCall, ToolCallChunk, ToolCallEndChunk, ToolCallStartChunk
from .tool_output import ToolOutput

ContentPart: TypeAlias = (
    Text | Image | Audio | Document | ToolOutput[Jsonable] | ToolCall | Thought
)
"""Content parts that may be included in a Message."""

UserContentPart: TypeAlias = Text | Image | Audio | Document | ToolOutput[Jsonable]
"""Content parts that can be included in a UserMessage."""

AssistantContentPart: TypeAlias = Text | ToolCall | Thought
"""Content parts that can be included in an AssistantMessage."""

AssistantContentChunk: TypeAlias = (
    TextStartChunk
    | TextChunk
    | TextEndChunk
    | ThoughtStartChunk
    | ThoughtChunk
    | ThoughtEndChunk
    | ToolCallStartChunk
    | ToolCallChunk
    | ToolCallEndChunk
)
"""Chunks of assistant content that may be streamed as generated by the LLM."""

__all__ = [
    "AssistantContentChunk",
    "AssistantContentPart",
    "Audio",
    "Base64AudioSource",
    "Base64DocumentSource",
    "Base64ImageSource",
    "ContentPart",
    "Document",
    "Image",
    "ImageMimeType",
    "Text",
    "TextChunk",
    "TextDocumentSource",
    "TextEndChunk",
    "TextStartChunk",
    "Thought",
    "ThoughtChunk",
    "ThoughtEndChunk",
    "ThoughtStartChunk",
    "ToolCall",
    "ToolCallChunk",
    "ToolCallEndChunk",
    "ToolCallStartChunk",
    "ToolOutput",
    "URLDocumentSource",
    "URLImageSource",
    "UserContentPart",
]
