import { Fragment } from "./fragments";
import { Page } from "./pages";
import { Float } from "./layout";
export declare const SIDES: string[];
export declare const CORNERS: string[];
export declare const HORIZONTAL_MARGIN_BOXES: string[];
export declare const VERTICAL_MARGIN_BOXES: string[];
export declare type Pseudo = "before" | "after" | "marker";
export declare const PSEUDOS: Pseudo[];
declare type MarginContent<C> = {
    [key: string]: C;
};
export declare class PageMarginContent<C> {
    readonly start: MarginContent<C>;
    first: MarginContent<C>;
    last: MarginContent<C>;
}
interface Leader {
    pseudo: string;
    element: HTMLElement;
    pattern: string;
}
interface TargetCounter {
    element: HTMLElement;
    varName: string;
    style?: string;
}
export declare class GCPMContext {
    /**
     * Map of floats by float-call
     */
    floats: Map<Element, Float>;
    /**
     * Map of floats by float-call
     */
    pendingFloats: Float[];
    /**
     * Map of leaders.
     */
    leaders: Map<HTMLElement, Leader>;
    /**
     * The global string sets of the pagination.
     */
    stringSets: MarginContent<string>;
    /**
     * The string sets of the current page.
     */
    pageStringSets: PageMarginContent<string>;
    /**
     * The global running elements of the pagination.
     */
    runnings: MarginContent<HTMLElement>;
    /**
     * The running elements of the current page.
     */
    pageRunnings: PageMarginContent<HTMLElement>;
    bookmarks: Set<HTMLElement>;
    targetCounters: {
        [id: string]: {
            [counterName: string]: TargetCounter[];
        };
    };
}
export declare function prepareGcpm(element: Element, customStyle: CSSStyleDeclaration, ctx: GCPMContext): void;
export declare function parsePseudosVals(element: HTMLElement, pseudo: Pseudo, ctx: GCPMContext): void;
export declare function createBookmarks(doc: Document, ctx: GCPMContext): Element;
export declare function setBookmarkLabels(bookmarksRoot: Element): void;
/**
 * Sets the content of the margins of a page
 * @param page
 * @param context
 */
export declare function setMarginContents(page: Page, ctx: GCPMContext): void;
export declare function setPageTargetCounters(page: Fragment, dest: HTMLElement, ctx: GCPMContext): void;
export declare function setTargetCounters(pages: Fragment[], ctx: GCPMContext): void;
export declare function setLeaders(ctx: GCPMContext): void;
export declare function isFloatCall(elem: Element): boolean;
export {};
