import type { IframeHTMLAttributes } from "react"; import { RefObject } from "react"; import type { Font } from "./font"; import { ContentNode } from "./ContentNode"; export interface UseReactToPrintOptions { bodyClass?: string; contentRef?: RefObject; documentTitle?: string | (() => string); fonts?: Font[]; ignoreGlobalStyles?: boolean; nonce?: string; onAfterPrint?: () => void; onBeforePrint?: () => Promise; onPrintError?: (errorLocation: "onBeforePrint" | "print", error: Error) => void; pageStyle?: string; preserveAfterPrint?: boolean; print?: (target: HTMLIFrameElement) => Promise; printIframeProps?: { allow?: IframeHTMLAttributes["allow"]; referrerPolicy?: IframeHTMLAttributes["referrerPolicy"]; sandbox?: IframeHTMLAttributes["sandbox"]; }; suppressErrors?: boolean; copyShadowRoots?: boolean; }