"""
@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 google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from streamlit.proto import ArrowData_pb2 as _ArrowData_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

DESCRIPTOR: _descriptor.FileDescriptor

@_typing.final
class Dataframe(_message.Message):
    """Proto message for st.dataframe and st.data_editor elements."""

    DESCRIPTOR: _descriptor.Descriptor

    class _EditingMode:
        ValueType = _typing.NewType("ValueType", _builtins.int)
        V: _TypeAlias = ValueType  # noqa: Y015

    class _EditingModeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Dataframe._EditingMode.ValueType], _builtins.type):
        DESCRIPTOR: _descriptor.EnumDescriptor
        READ_ONLY: Dataframe._EditingMode.ValueType  # 0
        """Read-only table."""
        FIXED: Dataframe._EditingMode.ValueType  # 1
        """Activates editing but only allow editing of existing cells."""
        DYNAMIC: Dataframe._EditingMode.ValueType  # 2
        """Activates editing and allow adding & deleting rows."""
        ADD_ONLY: Dataframe._EditingMode.ValueType  # 3
        """Activates editing and allow adding rows (no deleting)."""
        DELETE_ONLY: Dataframe._EditingMode.ValueType  # 4
        """Activates editing and allow deleting rows (no adding)."""

    class EditingMode(_EditingMode, metaclass=_EditingModeEnumTypeWrapper):
        """Available editing modes:"""

    READ_ONLY: Dataframe.EditingMode.ValueType  # 0
    """Read-only table."""
    FIXED: Dataframe.EditingMode.ValueType  # 1
    """Activates editing but only allow editing of existing cells."""
    DYNAMIC: Dataframe.EditingMode.ValueType  # 2
    """Activates editing and allow adding & deleting rows."""
    ADD_ONLY: Dataframe.EditingMode.ValueType  # 3
    """Activates editing and allow adding rows (no deleting)."""
    DELETE_ONLY: Dataframe.EditingMode.ValueType  # 4
    """Activates editing and allow deleting rows (no adding)."""

    class _SelectionMode:
        ValueType = _typing.NewType("ValueType", _builtins.int)
        V: _TypeAlias = ValueType  # noqa: Y015

    class _SelectionModeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Dataframe._SelectionMode.ValueType], _builtins.type):
        DESCRIPTOR: _descriptor.EnumDescriptor
        SINGLE_ROW: Dataframe._SelectionMode.ValueType  # 0
        """Only one row can be selected at a time."""
        MULTI_ROW: Dataframe._SelectionMode.ValueType  # 1
        """Multiple rows can be selected at a time."""
        SINGLE_COLUMN: Dataframe._SelectionMode.ValueType  # 2
        """Only one column can be selected at a time."""
        MULTI_COLUMN: Dataframe._SelectionMode.ValueType  # 3
        """Multiple columns can be selected at a time."""
        SINGLE_CELL: Dataframe._SelectionMode.ValueType  # 4
        """Only one cell can be selected at a time."""
        MULTI_CELL: Dataframe._SelectionMode.ValueType  # 5
        """Multiple cells (continuous range) can be selected."""

    class SelectionMode(_SelectionMode, metaclass=_SelectionModeEnumTypeWrapper):
        """Available selection modes:"""

    SINGLE_ROW: Dataframe.SelectionMode.ValueType  # 0
    """Only one row can be selected at a time."""
    MULTI_ROW: Dataframe.SelectionMode.ValueType  # 1
    """Multiple rows can be selected at a time."""
    SINGLE_COLUMN: Dataframe.SelectionMode.ValueType  # 2
    """Only one column can be selected at a time."""
    MULTI_COLUMN: Dataframe.SelectionMode.ValueType  # 3
    """Multiple columns can be selected at a time."""
    SINGLE_CELL: Dataframe.SelectionMode.ValueType  # 4
    """Only one cell can be selected at a time."""
    MULTI_CELL: Dataframe.SelectionMode.ValueType  # 5
    """Multiple cells (continuous range) can be selected."""

    ARROW_DATA_FIELD_NUMBER: _builtins.int
    ID_FIELD_NUMBER: _builtins.int
    COLUMNS_FIELD_NUMBER: _builtins.int
    EDITING_MODE_FIELD_NUMBER: _builtins.int
    DISABLED_FIELD_NUMBER: _builtins.int
    FORM_ID_FIELD_NUMBER: _builtins.int
    COLUMN_ORDER_FIELD_NUMBER: _builtins.int
    SELECTION_MODE_FIELD_NUMBER: _builtins.int
    ROW_HEIGHT_FIELD_NUMBER: _builtins.int
    PLACEHOLDER_FIELD_NUMBER: _builtins.int
    SELECTION_STATE_FIELD_NUMBER: _builtins.int
    SELECTION_DEFAULT_FIELD_NUMBER: _builtins.int
    id: _builtins.str
    """The id of the widget, this is required if the dataframe is editable"""
    columns: _builtins.str
    """Column configuration as JSON"""
    editing_mode: Global___Dataframe.EditingMode.ValueType
    """Activate table editing"""
    disabled: _builtins.bool
    """Deactivates editing"""
    form_id: _builtins.str
    """The form ID of the widget, this is required if the dataframe is editable"""
    row_height: _builtins.int
    """Row height in pixels"""
    placeholder: _builtins.str
    """Placeholder string used when rendering missing values (e.g. nulls, NaNs)."""
    selection_state: _builtins.str
    """Selection state (JSON serialized), set when selection is changed programmatically
    via session state. When present, frontend applies this selection.
    When absent, frontend manages its own selection state.
    """
    selection_default: _builtins.str
    """Default selection state (JSON serialized), set when selection_default is provided.
    Applied by the frontend only when there is no stored selection state.
    """
    @_builtins.property
    def arrow_data(self) -> _ArrowData_pb2.ArrowData:
        """The Arrow data to display"""

    @_builtins.property
    def column_order(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
        """Defines the order in which columns are displayed"""

    @_builtins.property
    def selection_mode(self) -> _containers.RepeatedScalarFieldContainer[Global___Dataframe.SelectionMode.ValueType]:
        """Activated dataframe selections events"""

    def __init__(
        self,
        *,
        arrow_data: _ArrowData_pb2.ArrowData | None = ...,
        id: _builtins.str = ...,
        columns: _builtins.str = ...,
        editing_mode: Global___Dataframe.EditingMode.ValueType = ...,
        disabled: _builtins.bool = ...,
        form_id: _builtins.str = ...,
        column_order: _abc.Iterable[_builtins.str] | None = ...,
        selection_mode: _abc.Iterable[Global___Dataframe.SelectionMode.ValueType] | None = ...,
        row_height: _builtins.int | None = ...,
        placeholder: _builtins.str | None = ...,
        selection_state: _builtins.str | None = ...,
        selection_default: _builtins.str | None = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _typing.Literal["_placeholder", b"_placeholder", "_row_height", b"_row_height", "_selection_default", b"_selection_default", "_selection_state", b"_selection_state", "arrow_data", b"arrow_data", "placeholder", b"placeholder", "row_height", b"row_height", "selection_default", b"selection_default", "selection_state", b"selection_state"]  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["_placeholder", b"_placeholder", "_row_height", b"_row_height", "_selection_default", b"_selection_default", "_selection_state", b"_selection_state", "arrow_data", b"arrow_data", "column_order", b"column_order", "columns", b"columns", "disabled", b"disabled", "editing_mode", b"editing_mode", "form_id", b"form_id", "id", b"id", "placeholder", b"placeholder", "row_height", b"row_height", "selection_default", b"selection_default", "selection_mode", b"selection_mode", "selection_state", b"selection_state"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    _WhichOneofReturnType__placeholder: _TypeAlias = _typing.Literal["placeholder"]  # noqa: Y015
    _WhichOneofArgType__placeholder: _TypeAlias = _typing.Literal["_placeholder", b"_placeholder"]  # noqa: Y015
    _WhichOneofReturnType__row_height: _TypeAlias = _typing.Literal["row_height"]  # noqa: Y015
    _WhichOneofArgType__row_height: _TypeAlias = _typing.Literal["_row_height", b"_row_height"]  # noqa: Y015
    _WhichOneofReturnType__selection_default: _TypeAlias = _typing.Literal["selection_default"]  # noqa: Y015
    _WhichOneofArgType__selection_default: _TypeAlias = _typing.Literal["_selection_default", b"_selection_default"]  # noqa: Y015
    _WhichOneofReturnType__selection_state: _TypeAlias = _typing.Literal["selection_state"]  # noqa: Y015
    _WhichOneofArgType__selection_state: _TypeAlias = _typing.Literal["_selection_state", b"_selection_state"]  # noqa: Y015
    @_typing.overload
    def WhichOneof(self, oneof_group: _WhichOneofArgType__placeholder) -> _WhichOneofReturnType__placeholder | None: ...
    @_typing.overload
    def WhichOneof(self, oneof_group: _WhichOneofArgType__row_height) -> _WhichOneofReturnType__row_height | None: ...
    @_typing.overload
    def WhichOneof(self, oneof_group: _WhichOneofArgType__selection_default) -> _WhichOneofReturnType__selection_default | None: ...
    @_typing.overload
    def WhichOneof(self, oneof_group: _WhichOneofArgType__selection_state) -> _WhichOneofReturnType__selection_state | None: ...

Global___Dataframe: _TypeAlias = Dataframe  # noqa: Y015
