"""
Notification component schemas.

Mirrors lightwave-ui/src/components/application/notifications/.
"""

from typing import Literal

from pydantic import BaseModel, ConfigDict, Field


class NotificationProps(BaseModel):
    """
    Notification/toast component props.

    Matches TypeScript NotificationProps.
    """

    # Content
    title: str = Field(..., description="Notification title")
    message: str | None = Field(None, description="Notification message")

    # Type
    type: Literal["info", "success", "warning", "error"] = Field("info", description="Notification type")

    # Icon
    icon: str | None = Field(None, description="Custom icon")
    show_icon: bool = Field(True, serialization_alias="showIcon", description="Show type icon")

    # Behavior
    dismissible: bool = Field(True, description="Can be dismissed")
    auto_close: bool = Field(True, serialization_alias="autoClose", description="Auto-close after duration")
    duration: int = Field(5000, description="Auto-close duration in ms")

    # Position (for toast-style)
    position: (
        Literal[
            "top-left",
            "top-center",
            "top-right",
            "bottom-left",
            "bottom-center",
            "bottom-right",
        ]
        | None
    ) = Field(None, description="Toast position")

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


__all__ = [
    "NotificationProps",
]
