import React from 'react';
import type { Tab as KuiTab } from '@kui-shell/core';
export type Props = {
    /** Source filepath */
    filepath?: string;
    /** Source content */
    source: string;
    /** Execute code blocks immediately? */
    executeImmediately?: boolean;
    /** Source content type */
    contentType?: 'text/html' | 'application/markdown';
    /** uuid of containing Block */
    execUUID?: string;
    tab?: KuiTab;
    /** if we have the full path to the source file */
    fullpath?: string;
    /** css class for top-level element */
    className?: string;
    /** extra css classes for top-level element */
    extraClassName?: string;
    /** Do not linkify external links */
    noExternalLinks?: boolean;
    /** If true, don't provide scrollability */
    nested?: boolean;
    /** Base HTTP Url? */
    baseUrl?: string;
    /** Support for pymdownx.snippets */
    snippetBasePath?: string;
    onRender?: () => void;
};
type State = {
    /** Did we get some severe error in rendering? */
    hasError: boolean;
    source: Props['source'];
};
export default class SimpleMarkdown extends React.PureComponent<Props, State> {
    private mounted;
    /** Handlers to be called on unmount */
    private readonly cleaners;
    constructor(props: Props);
    /** We are going away. Invoke cleaners */
    componentWillUnmount(): void;
    /** We are coming to life */
    componentDidMount(): void;
    /** New props, so re-fetch inlined source if needed */
    componentDidUpdate(prevProps: Props): void;
    /**
     * Base path for snippet inlining. Prefer `this.props`, which comes
     * from user/command line. Otherwise, look in the top matter of the
     * document.  Later, in `inlineSnippets` we will also look in each
     * include line in the document, which may also specify a
     * line-specific base path.
     */
    private get snippetBasePath();
    static getDerivedStateFromError(): {
        hasError: boolean;
    };
    componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
    /**
     * To support snippet inlining (which may require an async file
     * fetch), we need to prepare the source from props into state. Yay
     * react.
     */
    private prepareSource;
    private readonly uuid;
    private readonly choices;
    /** This will be the `components` argument to `<ReactMarkdown/>` */
    private readonly _components;
    /** `exec` controller */
    private get repl();
    /** @return markdown source, as string in application/markdown format */
    private source;
    /**
     * Deal with pymdown indentation syntax, and other not-worth-parsing
     * syntax from pymdown (such as target=_blank for links).
     */
    protected hackSource(source: string): string;
    private get className();
    private readonly _remarkPlugins;
    render(): JSX.Element;
}
export {};
