import React, { Component } from "react";
import type { T_PDFJS_Document } from "../types";
declare type Props = {
    url: string;
    beforeLoad: JSX.Element;
    errorMessage?: JSX.Element;
    children: (pdfDocument: T_PDFJS_Document) => JSX.Element;
    onError?: (error: Error) => void;
    cMapUrl?: string;
    cMapPacked?: boolean;
};
declare type State = {
    pdfDocument: T_PDFJS_Document | null;
    error: Error | null;
};
export declare class PdfLoader extends Component<Props, State> {
    state: State;
    documentRef: React.RefObject<HTMLElement>;
    componentDidMount(): void;
    componentWillUnmount(): void;
    componentDidUpdate({ url }: Props): void;
    componentDidCatch(error: Error, info?: any): void;
    load(): void;
    render(): JSX.Element;
    renderError(): React.FunctionComponentElement<any> | null;
}
export default PdfLoader;
