import { ComponentType } from "react"; import { v2, WrappedDocument, OpenAttestationDocument, v3, SignedVerifiableCredential } from "@trustvc/trustvc"; export type Attachment = v2.Attachment | v3.Attachment; export interface Renderer { attachment: Attachment; } export interface TemplateProps { document: D; wrappedDocument?: WrappedDocument | SignedVerifiableCredential; handleObfuscation: (field: string) => void; errorType?: string; } export interface Template { id: string; label: string; } export interface TemplateWithComponent extends Template { template: ComponentType>; predicate?: ({ document }: { document: D }) => boolean; } export interface TemplateRegistry { [key: string]: TemplateWithComponent[]; } export interface TemplateWithTypes extends TemplateWithComponent { type: string; }