import IInputKeyMessage from './IInputKeyMessage';
import IKeyUpEvent from './IKeyUpEvent';
import IInput from './IInput';
/**
 * The `sos.input` API groups together all input-related functionality, such as remote control key events. With this API, you can
 * listen to key events from the remote control and handle them in your application.
 */
export default class Input implements IInput {
    readonly window: Window;
    private readonly messagePrefix;
    static readonly MESSAGE_PREFIX: string;
    private readonly eventEmitter;
    private readonly hasWindowEventListener;
    private alive;
    /** @internal */
    constructor(window: Window, messagePrefix: string);
    /** @internal */
    destroy(): void;
    /**
     * The `onKeyUp` method sets up a listeners, which is called on every keystroke of the remote controller. For the specific logic of an
     * application (games for example), binding the remote control inputs can be helpful. Only a subset of all remote control keys is
     * supported on the specific device. Only numerical digits are guaranteed to be supported.
     *
     * :::note
     * This feature must be tested by users on real devices.
     * :::
     *
     * @param listener The listener function that will be called on every key up event.
     * @returns {void} Resolves when the listener is successfully set up.
     * @throws {Error} If listener is not valid function.
     * @throws {Error} If listener is unregistered.
     * @since 1.3.0
     */
    onKeyUp(listener: (event: IKeyUpEvent) => void): void;
    /** @internal */
    handleMessageData(data: IInputKeyMessage): void;
    /**
     * The `removeEventListeners()` method removes all event listeners bind on `sos.input` object.
     */
    removeEventListeners(): void;
    /**
     * The `removeEventListener()` method removes all event listeners for a specific event (only `keyup` is supported).
     *
     * @param event The name of the event to remove the listener for. Currently, only `keyup` is supported.
     * @param listener The listener function to remove.
     * @returns {void} Resolves when the listener is successfully removed.
     */
    removeEventListener(event: 'keyup', listener: (...args: any[]) => void): void;
    /** @internal */
    emitKeyUpEvent(event: IKeyUpEvent): void;
    private isTopLevelFrame;
    private canAccessParentOrigin;
    private dispatchEventToParent;
    private getMessage;
    private checkAlive;
}
