"""
Auth island prop schemas.

Auto-generated from packages/lightwave-ui/src/islands/auth-registry.tsx
Generated: 2026-02-02

Islands are React components hydrated on the client. These schemas define
the props that Django passes to the React island via JSON serialization.
"""

from pydantic import ConfigDict, Field

from lightwave.schema.pydantic.core.base import LightwaveBaseSchema


class BaseAuthProps(LightwaveBaseSchema):
    """
    Base props that all auth variants should support.

    Source: packages/lightwave-ui/src/islands/auth-registry.tsx
    """

    form_action: str | None = Field(None, serialization_alias="formAction")
    csrf_token: str | None = Field(None, serialization_alias="csrfToken")
    method: str | None = None
    login_url: str | None = Field(None, serialization_alias="loginUrl")
    signup_url: str | None = Field(None, serialization_alias="signupUrl")
    forgot_password_url: str | None = Field(None, serialization_alias="forgotPasswordUrl")
    home_url: str | None = Field(None, serialization_alias="homeUrl")
    social_providers: list[str] | None = Field(None, serialization_alias="socialProviders")
    logo: str | None = None
    brand_name: str | None = Field(None, serialization_alias="brandName")
    errors: str | None = None
    non_field_errors: list[str] | None = Field(None, serialization_alias="nonFieldErrors")
    initial_values: str | None = Field(None, serialization_alias="initialValues")
    success_message: str | None = Field(None, serialization_alias="successMessage")
    email: str | None = None
    resend_url: str | None = Field(None, serialization_alias="resendUrl")
    resend_action: str | None = Field(None, serialization_alias="resendAction")

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


AUTH_VARIANTS = [
    "login-combined",
    "signup-combined",
    "forgot-password-step-1",
    "forgot-password-step-2",
    "forgot-password-step-3",
    "forgot-password-step-4",
    "email-verification",
]

__all__ = ["BaseAuthProps", "AUTH_VARIANTS"]
