import 'regenerator-runtime/runtime';
import 'url-polyfill';
import { ViewingSession } from './modules/public-api';
export type { ViewingSession };
import { Annotation } from './modules/annotations/annotation';
import { EventData, EventName } from './modules/annotations/annotationEvents';
/**
 * Instance of the PDF Viewer
 * @public
 */
export declare class PdfViewerControl {
    /**
     * Creates a new PDF viewer within a page.
     *
     * @rejects with an error with a `name` property of `"ExpiredLicenseKeyError"` if your license key has expired.
     * @rejects with an error with a `name` property of `"InvalidLicenseKeyError"` if your license key is invalid or incompatible for any reason.
     */
    static create(options: {
        /**
         * PDF document to open.
         *
         * Must be one of the following types:
         * - `string` URL to a PDF. Both standard and data URLs are supported.
         * - `Uint8Array` A byte array of the contents of the PDF document.
         * - `ViewingSession` A Prizmdoc ViewingSession object.
        */
        sourceDocument: string | Uint8Array | ViewingSession;
        /**
         * DOM element where the viewer should be created.
         */
        container: Element;
        /**
         * Optional. PDF Viewer license key.
         *
         * When not provided, the viewer will be limited to free features and will include "Powered by Accusoft" branding.
         *
         * When the value `"eval"` is provided, the viewer will be created in Evaluation Mode, which will allow paid features to be evaluated,
         * and will apply additional branding, such as a full page watermark.
         *
         * @defaultValue `undefined`
         */
        licenseKey?: string;
        /**
         * Configuration for display of tools and controls in the user interface.
         * Some controls may be hidden/shown/moved due to space or touch gesture
         * considerations depending on the device and viewport. If undefined, uses
         * default interface controls defined below.
         *
         * @pro Requires a license which enables UI configuration functionality.
         */
        allowedControls?: {
            /**
            * Whether the full screen toggle button is available to the user.
            *
            * Note that, even when `true`, the full screen toggle may still be hidden if the viewer
            * is too small.
            *
            * @defaultValue `true`
            */
            fullScreenToggle?: boolean;
            /**
             * Whether printing controls are available to the user.
             *
             * Note that, even when `true`, printing controls are hidden when a mobile-friendly
             * interface is shown since mobile printing is not currently supported.
             *
             * @defaultValue `true`
             */
            printing?: boolean;
            /**
             * Whether search controls are available to the user.
             *
             * @defaultValue `true`
             */
            search?: boolean;
            /**
             * Whether controls to view and navigate by page thumbnails are available
             * to the user.
             *
             * @defaultValue `true`
             */
            thumbnails?: boolean;
            /**
             * Whether controls to view and navigate by annotations are available
             * to the user.
             *
             * @defaultValue `false`
             */
            annotationList?: boolean;
            /**
             * Whether controls to view and navigate by document outline are available
             * to the user.
             *
             * @defaultValue `false`
             */
            outline?: boolean;
            /**
             * Whether next and previous page navigation buttons are available to the
             * user.
             *
             * @defaultValue `true`
             */
            nextAndPreviousPageButtons?: boolean;
            /**
            * Whether the current page number and total page count are displayed to
            * the user. When displayed, the user can also tap/click on the displayed
            * current page number to input a specific page number to change to.
            *
            * @defaultValue `true`
            */
            pageNumberAndCount?: boolean;
            /**
            * Whether zoom in and zoom out buttons are available to the user.
            *
            * Note that, even when `true`, these buttons may still be hidden if the viewer is too small.
            *
            * Zooming is always possible via touchscreen gestures and via keyboard and
            * mousewheel actions.
            *
            * @defaultValue `true`
            */
            zoomInAndOutButtons?: boolean;
            /**
            * Whether the rectangle tool is available to the user in the toolbar,
            * allowing them to create new rectangle annotations.
            *
            * @defaultValue `false`
            */
            rectangleTool?: boolean;
            /**
            * Whether the ellipse tool is available to the user in the toolbar,
            * allowing them to create new ellipse annotations.
            *
            * @defaultValue `false`
            */
            ellipseTool?: boolean;
            /**
            * Whether the line tool is available to the user in the toolbar, allowing
            * them to create new line annotations.
            *
            * @defaultValue `false`
            */
            lineTool?: boolean;
            /**
            * Whether the freehand drawing tool is available to the user in the
            * toolbar, allowing them to create freehand drawing annotations.
            *
            * @defaultValue `false`
            */
            freehandDrawingTool?: boolean;
            /**
            * Whether the text highlight tool is available to the user in the
            * toolbar, allowing them to create text highlight annotations.
            *
            * @defaultValue `false`
            */
            textHighlightTool?: boolean;
            /**
            * Whether the freehand signature tool is available to the user in the
            * toolbar, allowing them to draw their signature and place it as an
            * annotation on the document.
            *
            * @defaultValue `false`
            */
            freehandSignatureTool?: boolean;
        };
    }): Promise<PdfViewerControl>;
    /**
     * Gets the current state of the annotations loaded in the viewer. Intended to give you a way to export annotations from one viewer so that you can reload them later in a different viewer via {@link PdfViewerControl.loadAnnotations | loadAnnotations}.
     *
     * Note that the array of objects returned by `getAnnotations` are merely a _copy_ of the annotations in the viewer. Any changes you make to these objects WILL NOT affect the actual annotations in the viewer, and any changes made by the user to the annotations in the viewer WILL NOT affect the state of the objects returned from this method. Use `getAnnotations` to simply get a copy of the current state of the annotations in the viewer.
     *
     * @pro Requires a license which enables annotation functionality.
     *
     * @returns - Promise which resolves to { annotations: Array<Annotations> }
     *
     * @rejects with an error with a `name` property of `"FeatureNotLicensed"` if your license key does not enable annotation functionality.
     */
    getAnnotations(): Promise<{
        annotations: Array<Annotation>;
    }>;
    /**
     * Loads annotations into the viewer. Intended for reloading annotations previously exported by a call to {@link PdfViewerControl.getAnnotations | getAnnotations}.
     *
     * Will not remove any annotations which already exist in the viewer. Can be called repeatedly to load more annotations.
     *
     * @pro Requires a license which enables annotation functionality.
     *
     * @param options
     * @returns Promise which resolves to an empty Object
     *
     * @rejects with an error with a `name` property of `"NonUniqueAnnotationIdError"` if any of the items in the `annotations` array use an `id` value which is used by another annotation in either the given `annotations` array or by an annotation already loaded in the viewer.
     * @rejects with an error with a `name` property of `"FeatureNotLicensed"` if your license key does not enable annotation functionality.
     */
    loadAnnotations(options: {
        /**
         * Every item in this array must include a unique `id` (which is not already in use by an annotation already loaded in the viewer) and be one of:
         * - {@link Ellipse}
         * - {@link FreehandDrawing}
         * - {@link FreehandSignature}
         * - {@link Line}
         * - {@link Rectangle}
         * - {@link TextHighlight}
         *    - Every `TextHighlight` annotation must include a `renderingMetadata` array formerly exported from {@link PdfViewerControl.getAnnotations}
         */
        annotations: Array<Annotation>;
    }): Promise<Object>;
    /**
     * Attaches an event handler for the event named `eventName`.
     *
     * @param eventName Name of the event. {@link EventName}
     * @param listener Function to be executed when the event is emitted.
     * @returns Control instance {@link PdfViewerControl}
     *
     * @throws `"InvalidInputError"` if the event name is not one of the allowed values {@link EventName}
     * @throws `"InvalidInputError"` if the listener is not a Function.
     * @throws `"FeatureNotLicensed"` if your license key does not enable the event name.
     */
    on(eventName: EventName, listener: (data: EventData) => void): PdfViewerControl;
    /**
    * Attaches an event handler for the event named `eventName`. The event handler is removed after the first event is emitted.
    *
    * @param eventName Name of the event. {@link EventName}
    * @param listener Function to be executed when the event is emitted.
    * @returns Control instance {@link PdfViewerControl}
    *
    * @throws `"InvalidInputError"` if the event name is not one of the allowed values {@link EventName}
    * @throws `"InvalidInputError"` if the listener is not a Function.
    * @throws `"FeatureNotLicensed"` if your license key does not enable the event name.
    */
    once(eventName: EventName, listener: (data: EventData) => void): PdfViewerControl;
    /**
    * Removes an event handler for the event named `eventName`.
    *
    * @param eventName Name of the event. {@link EventName}
    * @param listener Event handler function to be removed.
    * @returns Control instance {@link PdfViewerControl}
    *
    * @throws `"InvalidInputError"` if the event name is not one of the allowed values {@link EventName}
    * @throws `"InvalidInputError"` if the listener is not a Function.
    * @throws `"FeatureNotLicensed"` if your license key does not enable the event name.
    */
    off(eventName: EventName, listener: (data: EventData) => void): PdfViewerControl;
    /**
     * Removes all event handlers for the event named `eventName`. If no `eventName` is provided, all event handlers are removed.
     *
     * @param eventName Name of the event. {@link EventName}
     * @returns Control instance {@link PdfViewerControl}
     *
     * @throws `"FeatureNotLicensed"` if an event name is specified and your license key does not enable the event name.
     */
    removeAllListeners(eventName?: EventName): PdfViewerControl;
    /**
     * Attaches an event handler for the event named `eventName` to the head of the list of handlers.
     *
     * @param eventName Name of the event. {@link EventName}
     * @param listener Function to be executed when the event is emitted.
     * @returns Control instance {@link PdfViewerControl}
     *
     * @throws `"InvalidInputError"` if the event name is not one of the allowed values {@link EventName}
     * @throws `"InvalidInputError"` if the listener is not a Function.
     * @throws `"FeatureNotLicensed"` if your license key does not enable the event name.
     */
    prependListener(eventName: EventName, listener: (data: EventData) => void): PdfViewerControl;
    /**
    * Attaches an event handler for the event named `eventName` to the head of the list of handlers. The event handler is removed after the first event is emitted.
    *
    * @param eventName Name of the event. {@link EventName}
    * @param listener Function to be executed when the event is emitted.
    * @returns Control instance {@link PdfViewerControl}
    *
    * @throws `"InvalidInputError"` if the event name is not one of the allowed values {@link EventName}
    * @throws `"InvalidInputError"` if the listener is not a Function.
    * @throws `"FeatureNotLicensed"` if your license key does not enable the event name.
    */
    prependOnceListener(eventName: EventName, listener: (data: EventData) => void): PdfViewerControl;
}
