"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
*!
Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2026)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

from collections import abc as _abc
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf.internal import containers as _containers
from streamlit.proto import Common_pb2 as _Common_pb2
from streamlit.proto import Components_pb2 as _Components_pb2
import builtins as _builtins
import sys
import typing as _typing

if sys.version_info >= (3, 10):
    from typing import TypeAlias as _TypeAlias
else:
    from typing_extensions import TypeAlias as _TypeAlias

if sys.version_info >= (3, 13):
    from warnings import deprecated as _deprecated
else:
    from typing_extensions import deprecated as _deprecated

DESCRIPTOR: _descriptor.FileDescriptor

@_typing.final
class WidgetStates(_message.Message):
    """State for every widget in an app."""

    DESCRIPTOR: _descriptor.Descriptor

    WIDGETS_FIELD_NUMBER: _builtins.int
    @_builtins.property
    def widgets(self) -> _containers.RepeatedCompositeFieldContainer[Global___WidgetState]: ...
    def __init__(
        self,
        *,
        widgets: _abc.Iterable[Global___WidgetState] | None = ...,
    ) -> None: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["widgets", b"widgets"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...

Global___WidgetStates: _TypeAlias = WidgetStates  # noqa: Y015

@_typing.final
class WidgetState(_message.Message):
    """State for a single widget."""

    DESCRIPTOR: _descriptor.Descriptor

    ID_FIELD_NUMBER: _builtins.int
    TRIGGER_VALUE_FIELD_NUMBER: _builtins.int
    BOOL_VALUE_FIELD_NUMBER: _builtins.int
    DOUBLE_VALUE_FIELD_NUMBER: _builtins.int
    INT_VALUE_FIELD_NUMBER: _builtins.int
    STRING_VALUE_FIELD_NUMBER: _builtins.int
    DOUBLE_ARRAY_VALUE_FIELD_NUMBER: _builtins.int
    INT_ARRAY_VALUE_FIELD_NUMBER: _builtins.int
    STRING_ARRAY_VALUE_FIELD_NUMBER: _builtins.int
    JSON_VALUE_FIELD_NUMBER: _builtins.int
    ARROW_VALUE_FIELD_NUMBER: _builtins.int
    BYTES_VALUE_FIELD_NUMBER: _builtins.int
    FILE_UPLOADER_STATE_VALUE_FIELD_NUMBER: _builtins.int
    STRING_TRIGGER_VALUE_FIELD_NUMBER: _builtins.int
    CHAT_INPUT_VALUE_FIELD_NUMBER: _builtins.int
    JSON_TRIGGER_VALUE_FIELD_NUMBER: _builtins.int
    id: _builtins.str
    trigger_value: _builtins.bool
    """trigger_value is for buttons. A button's value needs to
    auto-revert back to False after the script has been run with
    the value set to True. After running the script, the server
    will reset all trigger_values in its stored Widget state dict.
    (Use bool_value for widgets like checkboxes, whose state persists
    beyond a single script run.)
    """
    bool_value: _builtins.bool
    double_value: _builtins.float
    int_value: _builtins.int
    string_value: _builtins.str
    json_value: _builtins.str
    bytes_value: _builtins.bytes
    json_trigger_value: _builtins.str
    """Transient trigger payload transport (JSON-stringified).
    - Purpose: carry per-run, non-persistent trigger data across the wire.
    - Shape: JSON object or JSON array (batched within a single update).
    - Lifecycle: treated as a trigger; cleared after each script run.
    Use json_value for persistent state; use json_trigger_value for
    auto-resetting payloads.
    """
    @_builtins.property
    def double_array_value(self) -> _Common_pb2.DoubleArray: ...
    @_builtins.property
    def int_array_value(self) -> _Common_pb2.SInt64Array: ...
    @_builtins.property
    def string_array_value(self) -> _Common_pb2.StringArray: ...
    @_builtins.property
    def arrow_value(self) -> _Components_pb2.ArrowTable: ...
    @_builtins.property
    def file_uploader_state_value(self) -> _Common_pb2.FileUploaderState: ...
    @_builtins.property
    @_deprecated("""This field has been marked as deprecated using proto field options.""")
    def string_trigger_value(self) -> _Common_pb2.StringTriggerValue:
        """DEPRECATED: StringTriggerValue proto message is deprecated and unused.
        The ChatInputValue proto message should be used instead.
        """

    @_builtins.property
    def chat_input_value(self) -> _Common_pb2.ChatInputValue:
        """ChatInputValue resets itself to empty after the script has been run.
        This is used for the chat_input widget.
        """

    def __init__(
        self,
        *,
        id: _builtins.str = ...,
        trigger_value: _builtins.bool = ...,
        bool_value: _builtins.bool = ...,
        double_value: _builtins.float = ...,
        int_value: _builtins.int = ...,
        string_value: _builtins.str = ...,
        double_array_value: _Common_pb2.DoubleArray | None = ...,
        int_array_value: _Common_pb2.SInt64Array | None = ...,
        string_array_value: _Common_pb2.StringArray | None = ...,
        json_value: _builtins.str = ...,
        arrow_value: _Components_pb2.ArrowTable | None = ...,
        bytes_value: _builtins.bytes = ...,
        file_uploader_state_value: _Common_pb2.FileUploaderState | None = ...,
        string_trigger_value: _Common_pb2.StringTriggerValue | None = ...,
        chat_input_value: _Common_pb2.ChatInputValue | None = ...,
        json_trigger_value: _builtins.str = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _typing.Literal["arrow_value", b"arrow_value", "bool_value", b"bool_value", "bytes_value", b"bytes_value", "chat_input_value", b"chat_input_value", "double_array_value", b"double_array_value", "double_value", b"double_value", "file_uploader_state_value", b"file_uploader_state_value", "int_array_value", b"int_array_value", "int_value", b"int_value", "json_trigger_value", b"json_trigger_value", "json_value", b"json_value", "string_array_value", b"string_array_value", "string_trigger_value", b"string_trigger_value", "string_value", b"string_value", "trigger_value", b"trigger_value", "value", b"value"]  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["arrow_value", b"arrow_value", "bool_value", b"bool_value", "bytes_value", b"bytes_value", "chat_input_value", b"chat_input_value", "double_array_value", b"double_array_value", "double_value", b"double_value", "file_uploader_state_value", b"file_uploader_state_value", "id", b"id", "int_array_value", b"int_array_value", "int_value", b"int_value", "json_trigger_value", b"json_trigger_value", "json_value", b"json_value", "string_array_value", b"string_array_value", "string_trigger_value", b"string_trigger_value", "string_value", b"string_value", "trigger_value", b"trigger_value", "value", b"value"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    _WhichOneofReturnType_value: _TypeAlias = _typing.Literal["trigger_value", "bool_value", "double_value", "int_value", "string_value", "double_array_value", "int_array_value", "string_array_value", "json_value", "arrow_value", "bytes_value", "file_uploader_state_value", "string_trigger_value", "chat_input_value", "json_trigger_value"]  # noqa: Y015
    _WhichOneofArgType_value: _TypeAlias = _typing.Literal["value", b"value"]  # noqa: Y015
    def WhichOneof(self, oneof_group: _WhichOneofArgType_value) -> _WhichOneofReturnType_value | None: ...

Global___WidgetState: _TypeAlias = WidgetState  # noqa: Y015
