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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
import typing_extensions
from ..core.serialization import FieldMetadata
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class BrowserWaitSelectorConfig(UniversalBaseModel):
    hidden: typing.Optional[bool] = pydantic.Field(default=None)
    """
    If true, Airtop AI will wait for the element to not be in the DOM or to be hidden.
    """

    timeout_seconds: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="timeoutSeconds")] = (
        pydantic.Field(default=None)
    )
    """
    The maximum time to wait for the selector to be present, in seconds. Defaults to 30 (30 seconds).
    """

    visible: typing.Optional[bool] = pydantic.Field(default=None)
    """
    If true, Airtop AI will wait for the element to be visible and present in the DOM.
    """

    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
