# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .assistant_selection import AssistantSelection
from .mini_chat_position import MiniChatPosition
from .open_new_chats import OpenNewChats
from .reset_to_new_chat import ResetToNewChat


class MiniChatSettingsPayload(UniversalBaseModel):
    """
    The settings object exchanged between client and server.

    Uses alias_generator=to_camel so the API schema exposes camelCase
    property names while Python code uses snake_case internally.
    """

    position: typing.Optional[MiniChatPosition] = pydantic.Field(default=None)
    """
    Chat bar screen position
    """

    reset_to_new_chat: typing_extensions.Annotated[
        typing.Optional[ResetToNewChat],
        FieldMetadata(alias="resetToNewChat"),
        pydantic.Field(alias="resetToNewChat", description="Idle timeout before auto-reset to new chat"),
    ] = None
    keyboard_shortcut: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="keyboardShortcut"),
        pydantic.Field(
            alias="keyboardShortcut",
            description="Global keyboard shortcut; empty string disables the shortcut. Whitespace-only values are normalized to empty string.",
        ),
    ] = None
    open_new_chats: typing_extensions.Annotated[
        typing.Optional[OpenNewChats],
        FieldMetadata(alias="openNewChats"),
        pydantic.Field(alias="openNewChats", description="Where new chats should open"),
    ] = None
    assistant_selection: typing_extensions.Annotated[
        typing.Optional[AssistantSelection],
        FieldMetadata(alias="assistantSelection"),
        pydantic.Field(alias="assistantSelection", description="How the active assistant is chosen on new chats"),
    ] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
