import * as React from "react";
import { PiKey } from "../../../util/Keys";
import { AbstractChoiceBox } from "../../boxes/AbstractChoiceBox";
import { SelectOption } from "../../boxes/SelectOption";
import { DropdownComponent } from "../dropdown/DropdownComponent";
import { BehaviorExecutionResult, PiCaret } from "../../../util/BehaviorUtils";
import { PiEditor } from "../../PiEditor";
export declare type AbstractChoiceComponentProps = {
    box: AbstractChoiceBox;
    editor: PiEditor;
};
export declare abstract class AbstractChoiceComponent extends React.Component<AbstractChoiceComponentProps, {}> {
    isEditing: boolean;
    text: string;
    selectedOptionId: string;
    _dropdownIsOpen: boolean;
    OPEN: boolean;
    hasError: boolean;
    private caretPosition;
    set dropdownIsOpen(v: boolean);
    get dropdownIsOpen(): boolean;
    protected element: HTMLDivElement | null;
    protected setElement: (element: HTMLDivElement) => void;
    protected dropdown: DropdownComponent | null;
    protected setDropdown: (drop: DropdownComponent) => void;
    disposeClickOutsideListener: Function | null;
    constructor(props: AbstractChoiceComponentProps);
    componentWillReceiveProps(nextProps: AbstractChoiceComponentProps): void;
    componentDidMount(): void;
    protected checkSelected(): void;
    setFocus: () => Promise<void>;
    protected closeDropdown: () => void;
    componentWillUnmount(): void;
    componentDidUpdate(): void;
    get myStyleClasses(): string;
    render(): JSX.Element;
    protected handleSelected: (optionId: string) => void;
    protected setSelectedOption: (id: string) => void;
    protected abstract getOptions: () => SelectOption[];
    protected onClick: () => Promise<void>;
    protected onBlur: (e: React.SyntheticEvent<any, Event>) => Promise<void>;
    protected onInput: (e: React.SyntheticEvent<any, Event>) => Promise<void>;
    protected onKeyDown: (e: React.KeyboardEvent<any>) => Promise<void>;
    protected onKeyPress: (e: React.KeyboardEvent<any>) => void;
    protected subscribeToBoxEvents: (box: AbstractChoiceBox) => void;
    triggerKeyPressEvent: (key: string) => Promise<void>;
    triggerKeyDownEvent: (key: PiKey) => Promise<void>;
    handleStringInput: (s: string) => Promise<BehaviorExecutionResult>;
    protected setCaret: (caret: PiCaret) => void;
    protected setCaretToMostLeft: () => void;
    protected setCaretToMostRight: () => void;
    startEditing: () => void;
    stopEditing: () => void;
    protected setCaretPosition: (position: number) => void;
    private setCaret3;
    private setCaretPosition2;
    protected clearSelection: () => void;
    protected getCaretPosition: () => number;
    protected shouldPropagate: (e: React.KeyboardEvent<any>) => boolean;
}
//# sourceMappingURL=AbstractChoiceComponent.d.ts.map