export interface MarkdownPlugin {
  /**
   * Called during component setup. Allows plugin to initialize.
   * @param context - an object that can be extended by plugins.
   */
  onSetup?(context: Record<string, any>): void

  /**
   * Called after markdown is parsed to HTML, before emitting.
   * Allows plugin to modify the HTML.
   * @param payload - contains original markdown and generated html.
   */
  onAfterParse?(payload: { markdown: string; html: string }): { html?: string }

  /**
   * Called right before the HTML is rendered (e.g., before v-html).
   * Allows final adjustments.
   * @param payload - contains html that will be rendered.
   */
  onBeforeRender?(payload: { html: string }): { html?: string }
}