import { Logger, Rect, PdfEngine, PdfDocumentObject, PdfSource, Rotation, PdfPageObject, Size, PdfBookmarkObject, PdfAnnotationObject, PdfLinkAnnoObject, PdfTextAnnoObject } from "@unionpdf/models";
import React, { ReactNode, ComponentProps, ChangeEvent } from "react";
export interface PdfNavigatorGotoPageEvent {
    kind: 'GotoPage';
    data: {
        pageIndex: number;
        rect?: Rect;
    };
}
export type PdfNavigatorEvent = PdfNavigatorGotoPageEvent;
export type PdfNavigatorListener = {
    source: string;
    handler: (event: PdfNavigatorEvent, source: string) => void;
};
export class PdfNavigator {
    currPageIndex: number;
    listeners: PdfNavigatorListener[];
    constructor(logger?: Logger);
    gotoPage(data: PdfNavigatorGotoPageEvent['data'], source: string): void;
    emit(evt: PdfNavigatorEvent, source: string): void;
    addEventListener(source: string, handler: PdfNavigatorListener['handler']): void;
    removeEventListener(source: string, handler: PdfNavigatorListener['handler']): void;
}
export const PdfNavigatorContext: React.Context<PdfNavigator | null>;
export interface PdfNavigatorContextProviderProps {
    navigator: PdfNavigator;
    children: ReactNode;
}
export function PdfNavigatorContextProvider(props: PdfNavigatorContextProviderProps): JSX.Element;
export function usePdfNavigator(): PdfNavigator | null;
export enum PdfApplicationMode {
    Read = 0,
    Edit = 1
}
export interface PdfApplicationContextValue {
    mode: PdfApplicationMode;
}
export const PdfApplicationContext: React.Context<PdfApplicationContextValue>;
export interface PdfApplicationContextProviderProps extends PdfApplicationContextValue {
    children: ReactNode;
}
export function PdfApplicationContextProvider(props: PdfApplicationContextProviderProps): JSX.Element;
export function usePdfApplication(): PdfApplicationContextValue;
export interface PdfApplicationProps extends ComponentProps<'div'> {
    mode: PdfApplicationMode;
}
export function PdfApplication(props: PdfApplicationProps): JSX.Element;
export const PdfEngineContext: React.Context<PdfEngine | null>;
export interface PdfEngineContextProviderProps {
    engine: PdfEngine;
    children: ReactNode;
}
export function PdfEngineContextProvider(props: PdfEngineContextProviderProps): JSX.Element;
export function usePdfEngine(): PdfEngine | null;
export interface Theme extends Record<string, string> {
}
export const defaultTheme: Theme;
export const ThemeContext: React.Context<Theme>;
export interface ThemeContextProviderProps {
    theme: Theme;
    children: JSX.Element;
}
export function ThemeContextProvider(props: ThemeContextProviderProps): JSX.Element;
export function useTheme(): Theme;
export const PdfDocumentContext: React.Context<PdfDocumentObject | null>;
export interface PdfDocumentContextProviderProps {
    doc: PdfDocumentObject;
    children: ReactNode;
}
export function PdfDocumentContextProvider(props: PdfDocumentContextProviderProps): JSX.Element;
export function usePdfDocument(): PdfDocumentObject | null;
export interface PdfDocumentProps extends ComponentProps<'div'> {
    id: string;
    source: PdfSource;
    onOpenSuccess?: (pdf: PdfDocumentObject) => void;
    onOpenFailure?: (error: Error) => void;
}
export function PdfDocument(props: PdfDocumentProps): JSX.Element;
export interface ErrorBoundaryProps {
    children: React.ReactNode;
}
export interface ErrorBoundaryState {
    error?: Error | undefined;
}
export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
    constructor(props: ErrorBoundaryProps);
    static getDerivedStateFromError(error: Error): {
        error: Error;
    };
    componentDidCatch(error: Error, errorInfo: any): void;
    render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
}
export const PDF_NAVIGATOR_SOURCE_TOOLBAR = "Toolbar";
export interface PdfToolbarProps extends ComponentProps<'div'> {
    scaleFactor: number;
    changeScaleFactor: (evt: ChangeEvent<HTMLInputElement>) => void;
    rotation: Rotation;
    changeRotation: (evt: ChangeEvent<HTMLSelectElement>) => void;
}
export function PdfToolbar(props: PdfToolbarProps): JSX.Element;
export type Direction = 'horizontal' | 'vertical';
export interface Layout {
    direction: Direction;
    itemsCount: number;
}
export interface PdfThumbnailsProps {
    layout?: Layout;
    size: Size;
    scaleFactor?: number;
    rotation?: Rotation;
}
export const PDF_NAVIGATOR_SOURCE_THUMBNAILS = "PdfThumbnails";
export function PdfThumbnails(props: PdfThumbnailsProps): JSX.Element;
export interface PdfThumbnailProps {
    observer: IntersectionObserver | null;
    page: PdfPageObject;
    scaleFactor: number;
    rotation: Rotation;
    isVisible: boolean;
    isCurrent: boolean;
    onClick: (page: PdfPageObject) => void;
}
export function PdfThumbnail(props: PdfThumbnailProps): JSX.Element;
export const PDF_NAVIGATOR_SOURCE_OUTLINES = "PdfBookmarks";
export interface PdfBookmarksProps {
}
export function PdfBookmarks(props: PdfBookmarksProps): JSX.Element;
export interface PdfBookmarkEntryProps {
    currPageIndex: number;
    bookmark: PdfBookmarkObject;
    onClick: (entry: PdfBookmarkObject) => void;
}
export function PdfBookmarkEntry(props: PdfBookmarkEntryProps): JSX.Element;
export type PdfPageContentComponentProps = Omit<PdfPageProps, 'children'>;
export type PdfPageContentComponent = (props: PdfPageContentComponentProps) => JSX.Element;
export interface PdfPagesProps {
    viewport: Size;
    pageGap?: number;
    visibleRange?: [number, number];
    scaleFactor?: number;
    rotation?: Rotation;
    pageContentComponent: PdfPageContentComponent;
    children?: any;
}
export const PDF_NAVIGATOR_SOURCE_PAGES = "PdfPages";
export const PDF_PAGE_DEFAULT_GAP = 8;
export function PdfPages(props: PdfPagesProps): JSX.Element;
export interface PdfPageProps {
    page: PdfPageObject;
    isCurrent: boolean;
    isVisible: boolean;
    pageGap: number;
    scaleFactor: number;
    rotation: Rotation;
    visualSize: Size;
    children: JSX.Element;
}
export function PdfPage(props: PdfPageProps): JSX.Element;
export interface PdfPageCanvasLayerProps {
    page: PdfPageObject;
    scaleFactor: number;
    rotation: Rotation;
    isVisible: boolean;
}
export function PdfPageCanvas(props: PdfPageCanvasLayerProps): JSX.Element | null;
export interface PdfPageAnnotationComponentProps<T = PdfAnnotationObject> {
    page: PdfPageObject;
    annotation: T;
    scaleFactor: number;
    rotation: Rotation;
}
export type PdfPageAnnotationComponent = (props: PdfPageAnnotationComponentProps) => JSX.Element;
export interface PdfPageAnnotationsProps {
    isVisible: boolean;
    page: PdfPageObject;
    scaleFactor: number;
    rotation: Rotation;
    annotationComponent: PdfPageAnnotationComponent;
}
export function PdfPageAnnotations(props: PdfPageAnnotationsProps): JSX.Element;
export interface PdfPageAnnotationBaseProps extends ComponentProps<'div'> {
    annotation: PdfAnnotationObject;
    scaleFactor: number;
    rotation: Rotation;
}
export function PdfPageAnnotationBase(props: PdfPageAnnotationBaseProps): JSX.Element;
export interface PdfPageLinkAnnotationProps {
    page: PdfPageObject;
    annotation: PdfLinkAnnoObject;
    scaleFactor: number;
    rotation: Rotation;
    onClick?: (linkAnnoObject: PdfLinkAnnoObject) => void;
}
export function PdfPageLinkAnnotation(props: PdfPageLinkAnnotationProps): JSX.Element;
export interface PdfPageTextAnnotationProps {
    page: PdfPageObject;
    annotation: PdfTextAnnoObject;
    scaleFactor: number;
    rotation: Rotation;
}
export function PdfPageTextAnnotation(props: PdfPageTextAnnotationProps): JSX.Element;

//# sourceMappingURL=index.d.ts.map
