import React, { CSSProperties } from "react";
import type { v4 } from "@govtechsg/open-attestation";
export type SvgRenderMethod = {
    type: "SvgRenderingTemplate2023";
    id: string;
    name?: string | undefined;
    digestMultibase?: string | undefined;
};
type InvalidSvgTemplateDisplayResult = {
    status: "DEFAULT";
} | {
    status: "DIGEST_ERROR";
} | {
    status: "FETCH_SVG_ERROR";
    error: Error;
};
type ValidSvgTemplateDisplayResult = {
    status: "OK";
    svgDataUri: string;
} | {
    status: "SVG_LOAD_ERROR";
    svgDataUri: string;
};
export type DisplayResult = InvalidSvgTemplateDisplayResult | ValidSvgTemplateDisplayResult;
export interface SvgRendererProps {
    /** The OpenAttestation v4 document to display */
    document: v4.OpenAttestationDocument;
    /** Override the img style */
    style?: CSSProperties;
    /** Override the img className */
    className?: string;
    /** An optional callback method that returns the display result  */
    onResult?: (result: DisplayResult, err?: Error) => void;
    /** An optional component to display while loading */
    loadingComponent?: React.ReactNode;
}
export declare const SVG_RENDERER_TYPE = "SvgRenderingTemplate2023";
/**
 * Component that accepts a v4 document to fetch and display the first available template SVG
 */
declare const SvgRenderer: React.ForwardRefExoticComponent<SvgRendererProps & React.RefAttributes<HTMLImageElement>>;
export { SvgRenderer };
