import { CssVars } from './css-vars'; export type Language = 'sv' | 'en' | 'no' | 'da' | 'fi' | 'de' | 'is' | 'es' | 'fr' | 'it'; export interface SignerCompletedData { token: string; documentId: string; signerId: string; failed?: string; } export interface SignerRejectedData { token: string; documentId: string; signerId: string; reason: string; } export interface EmbedSignDocumentOptions { /** Element or selector to mount the iframe into */ element: HTMLElement | string; /** Document ID to sign */ documentId: string; /** Authentication token */ token: string; /** Custom host (default: https://app.sajn.se) */ host?: string; /** Language for the embed UI (default: 'en') */ language?: Language; /** CSS class for the iframe */ className?: string; /** CSS variables for theming */ cssVars?: CssVars & Record; /** Allow document rejection */ allowDocumentRejection?: boolean; /** Show scroll indicator button (default: true) */ showScrollIndicator?: boolean; /** Additional props to pass */ additionalProps?: Record; /** Called when iframe is ready */ onDocumentReady?: () => void; /** Called when signer completes signing */ onSignerCompleted?: (data: SignerCompletedData) => void; /** Called on error */ onDocumentError?: (data: { code: string; message: string; }) => void; /** Called when signer rejects */ onSignerRejected?: (data: SignerRejectedData) => void; } export interface EmbedSignDocumentInstance { /** Remove the iframe and cleanup listeners */ destroy: () => void; /** The iframe element */ iframe: HTMLIFrameElement; } export declare function embedSignDocument(options: EmbedSignDocumentOptions): EmbedSignDocumentInstance;