import type { ReactElement } from 'react';
export interface Color {
    r: number;
    g: number;
    b: number;
    a: number;
}
export interface EdgeValues<T> {
    top: T;
    right: T;
    bottom: T;
    left: T;
}
export interface CornerValues {
    top_left: number;
    top_right: number;
    bottom_right: number;
    bottom_left: number;
}
export interface ElementStyleInfo {
    margin: EdgeValues<number>;
    padding: EdgeValues<number>;
    borderWidth: EdgeValues<number>;
    flexDirection: string;
    justifyContent: string;
    alignItems: string;
    flexWrap: string;
    gap: number;
    fontFamily: string;
    fontSize: number;
    fontWeight: number;
    fontStyle: string;
    lineHeight: number;
    textAlign: string;
    color: Color;
    backgroundColor: Color | null;
    borderColor: EdgeValues<Color>;
    borderRadius: CornerValues;
    opacity: number;
}
export interface ElementInfo {
    x: number;
    y: number;
    width: number;
    height: number;
    kind: string;
    nodeType: string;
    style: ElementStyleInfo;
    children: ElementInfo[];
    sourceLocation?: {
        file: string;
        line: number;
        column: number;
    };
    textContent?: string;
}
export interface PageInfo {
    width: number;
    height: number;
    contentX: number;
    contentY: number;
    contentWidth: number;
    contentHeight: number;
    elements: ElementInfo[];
}
export interface LayoutInfo {
    pages: PageInfo[];
}
export interface RenderWithLayoutResult {
    pdf: Uint8Array;
    layout: LayoutInfo;
}
export declare function renderPdf(json: string): Promise<Uint8Array>;
export declare function renderPdfWithLayout(json: string): Promise<RenderWithLayoutResult>;
export interface CertificationConfig {
    certificatePem: string;
    privateKeyPem: string;
    reason?: string;
    location?: string;
    contact?: string;
    visible?: boolean;
    page?: number;
    x?: number;
    y?: number;
    width?: number;
    height?: number;
}
/** @deprecated Use CertificationConfig */
export type SignatureConfig = CertificationConfig;
export interface RenderDocumentOptions {
    /** Data to embed as a hidden JSON attachment in the PDF. */
    embedData?: unknown;
    /** When true, form field values are rendered as static text. No interactive fields in output. */
    flattenForms?: boolean;
}
export declare function renderDocument(element: ReactElement, options?: RenderDocumentOptions): Promise<Uint8Array>;
export declare function renderDocumentWithLayout(element: ReactElement, options?: RenderDocumentOptions): Promise<RenderWithLayoutResult>;
export declare function renderTemplate(templateJson: string, dataJson: string): Promise<Uint8Array>;
export declare function renderTemplateWithLayout(templateJson: string, dataJson: string): Promise<RenderWithLayoutResult>;
export declare function certifyPdf(pdfBytes: Uint8Array, config: CertificationConfig): Promise<Uint8Array>;
/** @deprecated Use certifyPdf */
export declare const signPdf: typeof certifyPdf;
export interface RedactionRegion {
    /** 0-indexed page number. */
    page: number;
    /** X coordinate in points from the left edge. */
    x: number;
    /** Y coordinate in points from the top edge (web/screen coordinates). */
    y: number;
    /** Width of the redaction rectangle in points. */
    width: number;
    /** Height of the redaction rectangle in points. */
    height: number;
    /** Fill color as hex string (e.g. "#000000"). Defaults to black. */
    color?: string;
}
export declare function redactPdf(pdfBytes: Uint8Array, regions: RedactionRegion[]): Promise<Uint8Array>;
export interface RedactionPattern {
    /** The text or regex pattern to search for. */
    pattern: string;
    /** 'Literal' for exact text match (case-insensitive), 'Regex' for regex. */
    pattern_type: 'Literal' | 'Regex';
    /** Optional 0-indexed page to restrict search to. */
    page?: number;
    /** Fill color as hex string (e.g. "#000000"). Defaults to black. */
    color?: string;
}
/**
 * Find text regions matching patterns in a PDF.
 *
 * Searches PDF content streams for literal or regex patterns and returns
 * redaction regions (in web top-origin coordinates) for each match.
 */
export declare function findTextRegions(pdfBytes: Uint8Array, patterns: RedactionPattern[]): Promise<RedactionRegion[]>;
/**
 * Redact text matching patterns from a PDF.
 *
 * Convenience wrapper: finds all text matching the patterns, then
 * applies coordinate-based redaction to each match.
 */
export declare function redactText(pdfBytes: Uint8Array, patterns: RedactionPattern[]): Promise<Uint8Array>;
/**
 * Merge multiple PDF documents into a single PDF.
 *
 * @param pdfs - Array of PDF byte arrays to merge in order.
 * @returns The merged PDF as a Uint8Array.
 */
export declare function mergePdfs(pdfs: Uint8Array[]): Promise<Uint8Array>;
export { extractData } from './extract.js';
