export interface MermaidInstance { initialize: (config: Record) => void; render: (id: string, text: string) => Promise<{ svg: string; }>; } declare global { interface Window { mermaid: MermaidInstance | undefined; } } export default function useLoadMermaid(cdn?: Record): { mermaid: MermaidInstance | null; loading: boolean; error: Error | null; };