export interface PrintDocumentArgs { /** The model KEY the document is declared against (e.g. "SalesOrder"). */ model: string; /** The record id. */ id: string; /** The document key from contributions.documents[].key (e.g. "sale_ticket"). */ key: string; /** * print → open the PDF in a hidden iframe and fire the browser print dialog * (default; best for thermal tickets — one click to the printer). * download → save the PDF to disk. * open → open the PDF in a new tab (user prints from the viewer). */ mode?: 'print' | 'download' | 'open'; /** * Hint filename for download mode. Prefer leaving this unset: the server * expands `{{record.*}}` into Content-Disposition. A raw template string * (e.g. "cfdi-{{record.number}}.pdf") must NOT be used as a.download — * that is how downloads end up literally named with mustache braces. */ filename?: string; } /** Parse filename from Content-Disposition (RFC 5987 / quoted). */ export declare function filenameFromContentDisposition(header: string | undefined | null): string | undefined; /** True when a caller passed an unexpanded mustache template as filename. */ export declare function looksLikeFilenameTemplate(name: string | undefined): boolean; /** * Returns a `printDocument(args)` callback. Resolves once the PDF has been * fetched and the browser action (print/download/open) has been kicked off; * rejects if the fetch fails (surface the error to a toast). Returns the blob * URL created, revoked automatically after a minute. */ export declare function usePrintDocument(): ({ model, id, key, mode, filename, }: PrintDocumentArgs) => Promise; //# sourceMappingURL=use-print-document.d.ts.map