"""
Breadcrumb component schemas.

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

from pydantic import BaseModel, ConfigDict, Field


class BreadcrumbItem(BaseModel):
    """
    Breadcrumb item.
    """

    label: str = Field(..., description="Breadcrumb label")
    href: str | None = Field(None, description="Breadcrumb link (None for current)")
    icon: str | None = Field(None, description="Optional icon")

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


class BreadcrumbsProps(BaseModel):
    """
    Breadcrumbs component props.

    Matches TypeScript BreadcrumbsProps.
    """

    # Items
    items: list[BreadcrumbItem] = Field(..., description="Breadcrumb items")

    # Home
    show_home: bool = Field(True, serialization_alias="showHome", description="Show home icon as first item")
    home_href: str = Field("/", serialization_alias="homeHref", description="Home link URL")

    # Separator
    separator: str | None = Field(None, description="Custom separator character")

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


__all__ = [
    "BreadcrumbItem",
    "BreadcrumbsProps",
]
