// import { Root } from 'mdast-util-from-markdown/lib';
import type { MarkdownController } from "./controller";

// export type RootContent = Root['children'][0];
export type RootContent = any;

export type NextRenderFunc<T = any> = () => T;

export type RenderFunc<T = any> = (
  controller: MarkdownController,
  content: RootContent,
  next: NextRenderFunc<T>
) => T;

export interface CreateRenderExtensionParams {
  renderContent: RenderFunc;
}

export type MarkdownExtension = CreateRenderExtensionParams;
