"""
Form component schemas.

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

from pydantic import BaseModel, ConfigDict, Field


class FormProps(BaseModel):
    """
    Form wrapper component props.

    Matches TypeScript FormProps.
    """

    # Action
    action: str | None = Field(None, description="Form action URL")
    method: str | None = Field("POST", description="Form method")

    # State
    is_loading: bool = Field(False, serialization_alias="isLoading", description="Loading/submitting state")
    is_disabled: bool = Field(False, serialization_alias="isDisabled", description="Disabled state")

    # Submit button
    submit_text: str | None = Field("Submit", serialization_alias="submitText", description="Submit button text")
    show_cancel: bool | None = Field(False, serialization_alias="showCancel", description="Show cancel button")
    cancel_text: str | None = Field("Cancel", serialization_alias="cancelText", description="Cancel button text")

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


__all__ = [
    "FormProps",
]
