"""
This type stub file was generated by pyright.
"""

from typing import Optional
from prompt_toolkit.buffer import Buffer
from prompt_toolkit.key_binding import KeyPressEvent
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory, Suggestion
from prompt_toolkit.document import Document
from prompt_toolkit.history import History
from prompt_toolkit.shortcuts import PromptSession
from prompt_toolkit.layout.processors import Processor, Transformation, TransformationInput

class AppendAutoSuggestionInAnyLine(Processor):
    """
    Append the auto suggestion to lines other than the last (appending to the
    last line is natively supported by the prompt toolkit).
    """
    def __init__(self, style: str = ...) -> None:
        ...
    
    def apply_transformation(self, ti: TransformationInput) -> Transformation:
        ...
    


class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
    """
    A subclass of AutoSuggestFromHistory that allow navigation to next/previous
    suggestion from history. To do so it remembers the current position, but it
    state need to carefully be cleared on the right events.
    """
    def __init__(self) -> None:
        ...
    
    def reset_history_position(self, _: Buffer): # -> None:
        ...
    
    def disconnect(self): # -> None:
        ...
    
    def connect(self, pt_app: PromptSession): # -> None:
        ...
    
    def get_suggestion(self, buffer: Buffer, document: Document) -> Optional[Suggestion]:
        ...
    
    def up(self, query: str, other_than: str, history: History) -> None:
        ...
    
    def down(self, query: str, other_than: str, history: History) -> None:
        ...
    


def accept_or_jump_to_end(event: KeyPressEvent): # -> None:
    """Apply autosuggestion or jump to end of line."""
    ...

def accept(event: KeyPressEvent): # -> None:
    """Accept autosuggestion"""
    ...

def discard(event: KeyPressEvent): # -> None:
    """Discard autosuggestion"""
    ...

def accept_word(event: KeyPressEvent): # -> None:
    """Fill partial autosuggestion by word"""
    ...

def accept_character(event: KeyPressEvent): # -> None:
    """Fill partial autosuggestion by character"""
    ...

def accept_and_keep_cursor(event: KeyPressEvent): # -> None:
    """Accept autosuggestion and keep cursor in place"""
    ...

def accept_and_move_cursor_left(event: KeyPressEvent): # -> None:
    """Accept autosuggestion and move cursor left in place"""
    ...

def backspace_and_resume_hint(event: KeyPressEvent): # -> None:
    """Resume autosuggestions after deleting last character"""
    ...

def resume_hinting(event: KeyPressEvent): # -> None:
    """Resume autosuggestions"""
    ...

def up_and_update_hint(event: KeyPressEvent): # -> None:
    """Go up and update hint"""
    ...

def down_and_update_hint(event: KeyPressEvent): # -> None:
    """Go down and update hint"""
    ...

def accept_token(event: KeyPressEvent): # -> None:
    """Fill partial autosuggestion by token"""
    ...

Provider = ...
def swap_autosuggestion_up(event: KeyPressEvent): # -> None:
    """Get next autosuggestion from history."""
    ...

def swap_autosuggestion_down(event: KeyPressEvent): # -> None:
    """Get previous autosuggestion from history."""
    ...

def __getattr__(key): # -> (event: KeyPressEvent) -> None:
    ...

