"""
Pagination component schemas.

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

from pydantic import BaseModel, ConfigDict, Field


class PaginationProps(BaseModel):
    """
    Pagination component props.

    Matches TypeScript PaginationProps.
    """

    # State
    current_page: int = Field(1, serialization_alias="currentPage", description="Current page number")
    total_pages: int = Field(..., serialization_alias="totalPages", description="Total number of pages")
    total_items: int | None = Field(None, serialization_alias="totalItems", description="Total item count")
    page_size: int = Field(10, serialization_alias="pageSize", description="Items per page")

    # Display options
    show_first_last: bool = Field(
        True,
        serialization_alias="showFirstLast",
        description="Show first/last page buttons",
    )
    show_page_numbers: bool = Field(
        True,
        serialization_alias="showPageNumbers",
        description="Show page number buttons",
    )
    max_visible_pages: int = Field(
        5,
        serialization_alias="maxVisiblePages",
        description="Max visible page buttons",
    )

    # Labels
    prev_label: str | None = Field(None, serialization_alias="prevLabel", description="Previous button label")
    next_label: str | None = Field(None, serialization_alias="nextLabel", description="Next button label")

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


__all__ = [
    "PaginationProps",
]
