/// <reference types="react" />
import { Injectable } from './Readium/Injectable';
import { Locator } from './Readium/Locator';
import { WebpubManifest } from './WebpubManifestTypes/WebpubManifest';
export { WebpubManifest };
export declare const EpubMimeType = "application/epub";
export declare const WebpubMimeType = "application/webpub";
export declare type ColorMode = 'night' | 'sepia' | 'day';
export declare type FontFamily = 'publisher' | 'serif' | 'sans-serif' | 'open-dyslexic';
export declare type Navigator = {
    goForward: () => void;
    goBackward: () => void;
    setScroll: (val: 'scrolling' | 'paginated') => Promise<void>;
    goToPage: (href: string) => void;
};
export declare type PdfNavigator = Navigator & {
    zoomIn: () => Promise<void>;
    zoomOut: () => Promise<void>;
};
export declare type HtmlNavigator = Navigator & {
    increaseFontSize: () => Promise<void>;
    decreaseFontSize: () => Promise<void>;
    resetSettings: () => Promise<void>;
    setFontFamily: (family: FontFamily) => Promise<void>;
    setColorMode: (mode: ColorMode) => Promise<void>;
};
export declare type ReaderSettings = {
    colorMode: ColorMode;
    isScrolling: boolean;
    fontSize: number;
    fontFamily: FontFamily;
};
/**
 * This is the "public" state of the reader that
 * is returned to consumers of useWebReader. Each
 * reader (pdf/html) has its own internal state with
 * more details necessary for rendering
 */
export declare type ReaderState = {
    atStart: boolean;
    atEnd: boolean;
    location?: Locator;
    settings: ReaderSettings | undefined;
};
export declare type InactiveReader = null;
export declare type LoadingReader = {
    isLoading: true;
    content: JSX.Element;
    navigator: null;
    state: null;
    manifest: null;
    type: null;
};
declare type CommonReader = {
    isLoading: false;
    content: JSX.Element;
    manifest: WebpubManifest;
};
export declare type PDFActiveReader = CommonReader & {
    state: ReaderState;
    navigator: PdfNavigator;
    type: 'PDF';
};
export declare type HTMLActiveReader = CommonReader & {
    state: ReaderState;
    navigator: HtmlNavigator;
    type: 'HTML';
};
export declare type ActiveReader = PDFActiveReader | HTMLActiveReader;
export declare type ReaderReturn = InactiveReader | LoadingReader | ActiveReader;
export declare type GetContent = (href: string) => Promise<string>;
export declare type ReaderManagerArguments = {
    headerLeft?: JSX.Element;
};
export declare type UseWebReaderArguments = {
    webpubManifestUrl: string;
    proxyUrl?: string;
    getContent?: GetContent;
    pdfWorkerSrc?: string;
    injectablesReflowable?: Injectable[];
    injectablesFixed?: Injectable[];
    /**
     * CSS string to set the height of the reader in paginated mode, and also
     * in scrolling mode if `growWhenScrolling` is `false`.
     *
     * eg: "800px" or `calc(100vh-${CHROME_HEIGHT})`
     *
     * Default: `calc(100vh-${CHROME_HEIGHT})`
     */
    height?: string;
    /**
     * Tells the renderer if it should grow to fit content in scrolling mode, or if should
     * remain the same height and instead show an internal scroll bar. Set to `true` by
     * default, as this should be used in a full-page reader, the most common use case.
     *
     * Default: `true`
     */
    growWhenScrolling?: boolean;
    /**
     * Initial user settings for the reader
     */
    readerSettings?: Partial<ReaderSettings>;
    /**
     * If enabled, reading location will be persisted to local storage and recalled from
     * there upon initial load.
     *
     * Default: `true`
     */
    persistLastLocation?: boolean;
    /**
     * If enabled, reader settings will be persisted to local storage and recalled
     * from there upon initial load.
     *
     * Default: `true`
     */
    persistSettings?: boolean;
};
export declare type ActiveReaderArguments = UseWebReaderArguments & {
    manifest: WebpubManifest;
};
export declare type InactiveReaderArguments = undefined;
export declare type ReaderArguments = ActiveReaderArguments | InactiveReaderArguments;
export declare type GetColor = (light: string, dark: string, sepia: string) => string;
