"""Stub file for reflex/components/suneditor/editor.py"""

# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
import enum
from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload

from reflex.base import Base
from reflex.components.component import NoSSRComponent
from reflex.event import BASE_STATE, EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var

class EditorButtonList(list, enum.Enum):
    BASIC = [["font", "fontSize"], ["fontColor"], ["horizontalRule"], ["link", "image"]]
    FORMATTING = [
        ["undo", "redo"],
        ["bold", "underline", "italic", "strike", "subscript", "superscript"],
        ["removeFormat"],
        ["outdent", "indent"],
        ["fullScreen", "showBlocks", "codeView"],
        ["preview", "print"],
    ]
    COMPLEX = [
        ["undo", "redo"],
        ["font", "fontSize", "formatBlock"],
        ["bold", "underline", "italic", "strike", "subscript", "superscript"],
        ["removeFormat"],
        "/",
        ["fontColor", "hiliteColor"],
        ["outdent", "indent"],
        ["align", "horizontalRule", "list", "table"],
        ["link", "image", "video"],
        ["fullScreen", "showBlocks", "codeView"],
        ["preview", "print"],
        ["save", "template"],
    ]

class EditorOptions(Base):
    default_tag: Optional[str]
    mode: Optional[str]
    rtl: Optional[bool]
    button_list: Optional[List[Union[List[str], str]]]

def on_blur_spec(e: Var, content: Var[str]) -> Tuple[Var[str]]: ...
def on_paste_spec(
    e: Var, clean_data: Var[str], max_char_count: Var[bool]
) -> Tuple[Var[str], Var[bool]]: ...

class Editor(NoSSRComponent):
    def add_imports(self) -> ImportDict: ...
    @overload
    @classmethod
    def create(  # type: ignore
        cls,
        *children,
        lang: Optional[
            Union[
                Literal[
                    "ckb",
                    "da",
                    "de",
                    "en",
                    "es",
                    "fr",
                    "he",
                    "it",
                    "ja",
                    "ko",
                    "lv",
                    "pl",
                    "pt_br",
                    "ro",
                    "ru",
                    "se",
                    "ua",
                    "zh_cn",
                ],
                Var[
                    Union[
                        Literal[
                            "ckb",
                            "da",
                            "de",
                            "en",
                            "es",
                            "fr",
                            "he",
                            "it",
                            "ja",
                            "ko",
                            "lv",
                            "pl",
                            "pt_br",
                            "ro",
                            "ru",
                            "se",
                            "ua",
                            "zh_cn",
                        ],
                        dict,
                    ]
                ],
                dict,
            ]
        ] = None,
        name: Optional[Union[Var[str], str]] = None,
        default_value: Optional[Union[Var[str], str]] = None,
        width: Optional[Union[Var[str], str]] = None,
        height: Optional[Union[Var[str], str]] = None,
        placeholder: Optional[Union[Var[str], str]] = None,
        auto_focus: Optional[Union[Var[bool], bool]] = None,
        set_options: Optional[Union[Dict, Var[Dict]]] = None,
        set_all_plugins: Optional[Union[Var[bool], bool]] = None,
        set_contents: Optional[Union[Var[str], str]] = None,
        append_contents: Optional[Union[Var[str], str]] = None,
        set_default_style: Optional[Union[Var[str], str]] = None,
        disable: Optional[Union[Var[bool], bool]] = None,
        hide: Optional[Union[Var[bool], bool]] = None,
        hide_toolbar: Optional[Union[Var[bool], bool]] = None,
        disable_toolbar: Optional[Union[Var[bool], bool]] = None,
        style: Optional[Style] = None,
        key: Optional[Any] = None,
        id: Optional[Any] = None,
        class_name: Optional[Any] = None,
        autofocus: Optional[bool] = None,
        custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
        on_blur: Optional[
            Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
        ] = None,
        on_change: Optional[
            Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
        ] = None,
        on_click: Optional[EventType[[], BASE_STATE]] = None,
        on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
        on_copy: Optional[EventType[[], BASE_STATE]] = None,
        on_cut: Optional[EventType[[], BASE_STATE]] = None,
        on_double_click: Optional[EventType[[], BASE_STATE]] = None,
        on_focus: Optional[EventType[[], BASE_STATE]] = None,
        on_input: Optional[EventType[[], BASE_STATE]] = None,
        on_load: Optional[
            Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
        ] = None,
        on_mount: Optional[EventType[[], BASE_STATE]] = None,
        on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
        on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
        on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
        on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
        on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
        on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
        on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
        on_paste: Optional[
            Union[
                EventType[[], BASE_STATE],
                EventType[[str], BASE_STATE],
                EventType[[str, bool], BASE_STATE],
            ]
        ] = None,
        on_scroll: Optional[EventType[[], BASE_STATE]] = None,
        on_unmount: Optional[EventType[[], BASE_STATE]] = None,
        toggle_code_view: Optional[
            Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
        ] = None,
        toggle_full_screen: Optional[
            Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
        ] = None,
        **props,
    ) -> "Editor":
        """Create an instance of Editor. No children allowed.

        Args:
            set_options(Optional[EditorOptions]): Configuration object to further configure the instance.
            lang: Language of the editor.  Alternatively to a string, a dict of your language can be passed to this prop.  Please refer to the library docs for this.  options: "en" | "da" | "de" | "es" | "fr" | "ja" | "ko" | "pt_br" |   "ru" | "zh_cn" | "ro" | "pl" | "ckb" | "lv" | "se" | "ua" | "he" | "it"  default: "en".
            name: This is used to set the HTML form name of the editor.  This means on HTML form submission,  it will be submitted together with contents of the editor by the name provided.
            default_value: Sets the default value of the editor.  This is useful if you don't want the on_change method to be called on render.  If you want the on_change method to be called on render please use the set_contents prop
            width: Sets the width of the editor.  px and percentage values are accepted, eg width="100%" or width="500px"  default: 100%
            height: Sets the height of the editor.  px and percentage values are accepted, eg height="100%" or height="100px"
            placeholder: Sets the placeholder of the editor.
            auto_focus: Should the editor receive focus when initialized?
            set_options: Pass an EditorOptions instance to modify the behaviour of Editor even more.
            set_all_plugins: Whether all SunEditor plugins should be loaded.  default: True.
            set_contents: Set the content of the editor.  Note: To set the initial contents of the editor  without calling the on_change event,  please use the default_value prop.  set_contents is used to set the contents of the editor programmatically.  You must be aware that, when the set_contents's prop changes,  the on_change event is triggered.
            append_contents: Append editor content
            set_default_style: Sets the default style of the editor's edit area
            disable: Disable the editor  default: False.
            hide: Hide the editor  default: False.
            hide_toolbar: Hide the editor toolbar  default: False.
            disable_toolbar: Disable the editor toolbar  default: False.
            on_change: Fired when the editor content changes.
            on_input: Fired when the something is inputted in the editor.
            on_blur: Fired when the editor loses focus.
            on_load: Fired when the editor is loaded.
            on_copy: Fired when the editor content is copied.
            on_cut: Fired when the editor content is cut.
            on_paste: Fired when the editor content is pasted.
            toggle_code_view: Fired when the code view is toggled.
            toggle_full_screen: Fired when the full screen mode is toggled.
            style: The style of the component.
            key: A unique key for the component.
            id: The id for the component.
            class_name: The class name for the component.
            autofocus: Whether the component should take the focus once the page is loaded
            custom_attrs: custom attribute
            **props: Any properties to be passed to the Editor

        Returns:
            An Editor instance.

        Raises:
            ValueError: If set_options is a state Var.
        """
        ...
