import { OptimizedBuffer } from "../buffer";
import type { KeyEvent } from "../lib/KeyHandler";
import { type ColorInput } from "../lib/RGBA";
import { Renderable, type RenderableOptions } from "../Renderable";
import type { RenderContext } from "../types";
export interface InputRenderableOptions extends RenderableOptions<InputRenderable> {
    backgroundColor?: ColorInput;
    textColor?: ColorInput;
    focusedBackgroundColor?: ColorInput;
    focusedTextColor?: ColorInput;
    placeholder?: string;
    placeholderColor?: ColorInput;
    cursorColor?: ColorInput;
    maxLength?: number;
    value?: string;
}
export declare enum InputRenderableEvents {
    INPUT = "input",
    CHANGE = "change",
    ENTER = "enter"
}
export declare class InputRenderable extends Renderable {
    protected _focusable: boolean;
    private _value;
    private _cursorPosition;
    private _placeholder;
    private _backgroundColor;
    private _textColor;
    private _focusedBackgroundColor;
    private _focusedTextColor;
    private _placeholderColor;
    private _cursorColor;
    private _maxLength;
    private _lastCommittedValue;
    protected _defaultOptions: {
        backgroundColor: string;
        textColor: string;
        focusedBackgroundColor: string;
        focusedTextColor: string;
        placeholder: string;
        placeholderColor: string;
        cursorColor: string;
        maxLength: number;
        value: string;
    };
    constructor(ctx: RenderContext, options: InputRenderableOptions);
    private updateCursorPosition;
    focus(): void;
    blur(): void;
    protected renderSelf(buffer: OptimizedBuffer, deltaTime: number): void;
    private refreshFrameBuffer;
    get value(): string;
    set value(value: string);
    set placeholder(placeholder: string);
    get cursorPosition(): number;
    set cursorPosition(position: number);
    insertText(text: string): void;
    deleteCharacter(direction: "backward" | "forward"): void;
    handleKeyPress(key: KeyEvent | string): boolean;
    set maxLength(maxLength: number);
    set backgroundColor(value: ColorInput);
    set textColor(value: ColorInput);
    set focusedBackgroundColor(value: ColorInput);
    set focusedTextColor(value: ColorInput);
    set placeholderColor(value: ColorInput);
    set cursorColor(value: ColorInput);
    updateFromLayout(): void;
    protected onResize(width: number, height: number): void;
    protected onRemove(): void;
}
