"""Authentication-related GraphQL types."""

import strawberry

from .user import UserType


@strawberry.type
class AuthTokens:
    """JWT token pair for authentication."""

    access_token: str
    refresh_token: str


@strawberry.type
class AuthPayload:
    """Response payload for login and register mutations."""

    user: UserType
    tokens: AuthTokens


@strawberry.input
class LoginInput:
    """Input for login mutation."""

    username: str
    password: str


@strawberry.input
class RegisterInput:
    """Input for register mutation."""

    username: str
    email: str
    password: str
    password_confirm: str
    first_name: str | None = ""
    last_name: str | None = ""


@strawberry.input
class RefreshTokenInput:
    """Input for token refresh mutation."""

    refresh_token: str
