"""
Tooltip component schemas.

Mirrors lightwave-ui/src/components/base/tooltip/.
"""

from typing import Literal

from pydantic import BaseModel, ConfigDict, Field


class TooltipProps(BaseModel):
    """
    Tooltip component props.

    Matches TypeScript TooltipProps.
    """

    # Content
    content: str = Field(..., description="Tooltip content")
    title: str | None = Field(None, description="Optional tooltip title")

    # Positioning
    placement: Literal[
        "top",
        "top-start",
        "top-end",
        "bottom",
        "bottom-start",
        "bottom-end",
        "left",
        "left-start",
        "left-end",
        "right",
        "right-start",
        "right-end",
    ] = Field("top", description="Tooltip placement")

    # Behavior
    delay: int | None = Field(None, description="Show delay in ms")
    close_delay: int | None = Field(None, serialization_alias="closeDelay", description="Close delay in ms")

    model_config = ConfigDict(
        populate_by_name=True,
        extra="forbid",
    )


__all__ = [
    "TooltipProps",
]
