"""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, Literal, Optional, overload

from reflex.base import Base
from reflex.components.component import NoSSRComponent
from reflex.event import 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: str | None
    mode: str | None
    rtl: bool | None
    button_list: list[list[str] | str] | None

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

        Args:
            set_options: 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.
        """
        ...
