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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .click_action_data import ClickActionData


class ClickAction(UniversalBaseModel):
    """
    Click action parameters.
    """

    selector: typing.Optional[str] = pydantic.Field(default=None)
    """
    CSS selector for the element
    """

    intention: typing.Optional[str] = pydantic.Field(default=None)
    """
    The intention or goal of the click
    """

    data: typing.Optional[ClickActionData] = pydantic.Field(default=None)
    """
    Additional context data
    """

    timeout: typing.Optional[float] = pydantic.Field(default=None)
    """
    Timeout in milliseconds
    """

    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
