"""
Progress steps component schemas.

Mirrors lightwave-ui/src/components/application/progress-steps/.
"""

from typing import Literal

from pydantic import BaseModel, ConfigDict, Field


class ProgressStep(BaseModel):
    """
    Progress step item.
    """

    key: str = Field(..., description="Step key/identifier")
    label: str = Field(..., description="Step label")
    description: str | None = Field(None, description="Step description")
    status: Literal["pending", "current", "completed", "error"] = Field("pending", description="Step status")

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


class ProgressStepsProps(BaseModel):
    """
    Progress steps component props.

    Matches TypeScript ProgressStepsProps.
    """

    # Steps
    steps: list[ProgressStep] = Field(..., description="Step definitions")

    # Current
    current_step: str | None = Field(None, serialization_alias="currentStep", description="Current step key")

    # Variants
    variant: Literal["default", "compact", "vertical"] = Field("default", description="Step display variant")

    # Clickable
    clickable: bool = Field(False, description="Steps are clickable")

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


__all__ = [
    "ProgressStep",
    "ProgressStepsProps",
]
