import { Link, Locator, Publication, ReadingProgression } from "@readium/shared";
import { VisualNavigator, VisualNavigatorViewport } from "../Navigator";
import { Configurable } from "../preferences/Configurable";
import { BasicTextSelection, CommsEventKey, ContextMenuEvent, FrameClickEvent, KeyboardEventData, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
import { WebPubFrameManager } from "./WebPubFrameManager";
import { ManagerEventKey } from "../epub/EpubNavigator";
import { IWebPubPreferences, WebPubPreferences } from "./preferences/WebPubPreferences";
import { IWebPubDefaults } from "./preferences/WebPubDefaults";
import { WebPubSettings } from "./preferences/WebPubSettings";
import { IPreferencesEditor } from "../preferences/PreferencesEditor";
import { IInjectablesConfig } from "../injection/Injectable";
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator";
export interface WebPubNavigatorConfiguration {
    preferences: IWebPubPreferences;
    defaults: IWebPubDefaults;
    injectables?: IInjectablesConfig;
    contentProtection?: IContentProtectionConfig;
    keyboardPeripherals?: IKeyboardPeripheralsConfig;
}
export interface WebPubNavigatorListeners {
    frameLoaded: (wnd: Window) => void;
    positionChanged: (locator: Locator) => void;
    tap: (e: FrameClickEvent) => boolean;
    click: (e: FrameClickEvent) => boolean;
    zoom: (scale: number) => void;
    scroll: (delta: number) => void;
    customEvent: (key: string, data: unknown) => void;
    handleLocator: (locator: Locator) => boolean;
    textSelected: (selection: BasicTextSelection) => void;
    contentProtection: (type: string, data: SuspiciousActivityEvent) => void;
    contextMenu: (data: ContextMenuEvent) => void;
    peripheral: (data: KeyboardEventData) => void;
}
export declare class WebPubNavigator extends VisualNavigator implements Configurable<WebPubSettings, WebPubPreferences> {
    private readonly pub;
    private readonly container;
    private readonly listeners;
    private framePool;
    private currentIndex;
    private currentLocation;
    private _preferences;
    private _defaults;
    private _settings;
    private _css;
    private _preferencesEditor;
    private readonly _injector;
    private readonly _contentProtection;
    private readonly _keyboardPeripherals;
    private readonly _navigatorProtector;
    private readonly _keyboardPeripheralsManager;
    private readonly _suspiciousActivityListener;
    private readonly _keyboardPeripheralListener;
    private webViewport;
    constructor(container: HTMLElement, pub: Publication, listeners: WebPubNavigatorListeners, initialPosition?: Locator | undefined, configuration?: WebPubNavigatorConfiguration);
    load(): Promise<void>;
    get settings(): Readonly<WebPubSettings>;
    get preferencesEditor(): IPreferencesEditor;
    submitPreferences(preferences: WebPubPreferences): Promise<void>;
    private applyPreferences;
    private updateCSS;
    private compileCSSProperties;
    private commitCSS;
    /**
     * Exposed to the public to compensate for lack of implemented readium conveniences
     * TODO remove when settings management is incorporated
     */
    get _cframes(): (WebPubFrameManager | undefined)[];
    private get hasDisplayTransformability();
    eventListener(key: CommsEventKey | ManagerEventKey, data: unknown): void;
    private determineModules;
    private attachListener;
    private apply;
    destroy(): Promise<void>;
    private changeResource;
    private updateViewport;
    private syncLocation;
    goBackward(_animated: boolean, cb: (ok: boolean) => void): void;
    goForward(_animated: boolean, cb: (ok: boolean) => void): void;
    get currentLocator(): Locator;
    get viewport(): VisualNavigatorViewport;
    get isScrollStart(): boolean;
    get isScrollEnd(): boolean;
    get canGoBackward(): boolean;
    get canGoForward(): boolean;
    get readingProgression(): ReadingProgression;
    get publication(): Publication;
    private loadLocator;
    go(locator: Locator, _: boolean, cb: (ok: boolean) => void): void;
    goLink(link: Link, animated: boolean, cb: (ok: boolean) => void): void;
    private createCurrentLocator;
}
export declare const ExperimentalWebPubNavigator: typeof WebPubNavigator;
