import { markdownToSafeHtml } from "@vertigis/react-ui/utils/markdown";
import type * as defs from "./FormDefinition";
/**
* Ensures the supplied string can be rendered literally in markdown by
* escaping any characters that have special meaning in
* markdown syntax.
*
* This method assumes that we are using a markdown parser that complies
* with the commonmark specification. (http://commonmark.org/)
* As such, the only escaping performed is that which is necessary for
* the features suppored by commonmark.
*
* You can test commonmark behaviour here: http://spec.commonmark.org/dingus/
*
* @param literalString A string to be treated literally in markdown.
*/
export declare function escapeTextForMarkdown(literalString: string): string;
/**
* Returns the underlying content from a `defs.Text` input.
* This function does not perform any translation or markdown rendering.
* Its sole purpose is to expose the string from inside the relevant object,
* or return the input itself if it's already a string or undefined.
* @param text The text to extract content from.
* @returns
*/
export declare function getContent(text: defs.Text | undefined): string | undefined;
export declare function hasContent(text: defs.Text | undefined): text is defs.Text;
export declare function isMarkdown(text: (Partial & defs.Text) | undefined | null): text is defs.MarkdownRef;
export declare function isStatus(text: (Partial & defs.Text) | undefined | null): text is defs.StatusRef;
export declare function isInvalidError(text: (Partial & defs.Text) | undefined | null): boolean;
export declare function markdownToText(markdown: string): string;
export declare function textToHtml(text: string): string;
export { markdownToSafeHtml };