import { HotPage } from "./HotPage";
/**
 * A file to process.
 */
export interface IHotFile {
    /**
     * The parent page.
     */
    page?: HotPage;
    /**
     * The name of the file.
     */
    name?: string;
    /**
     * The url to the file to get.
     */
    url?: string;
    /**
     * The path to the local file to get.
     */
    localFile?: string;
    /**
     * The content of the file to process.
     */
    content?: string;
    /**
     * Force all errors to be thrown.
     */
    throwAllErrors?: boolean;
}
/**
 * Parser options for when processing a string or file.
 */
export interface ParserOptions {
    /**
     * Output the commands generated from processing. Default: true
     */
    outputCommands?: boolean;
    /**
     * Allow JSON.stringify to be used during processing. Default: true
     */
    allowStringify?: boolean;
}
/**
 * A file to process.
 */
export declare class HotFile implements IHotFile {
    /**
     * The parent page.
     */
    page: HotPage;
    /**
     * The name of the file.
     */
    name: string;
    /**
     * The url to the file to get.
     */
    url: string;
    /**
     * The path to the local file to get.
     */
    localFile: string;
    /**
     * The content of the file to process.
     */
    content: string;
    /**
     * Force all errors to be thrown.
     */
    throwAllErrors: boolean;
    constructor(copy?: IHotFile);
    /**
     * Set the content of this file.
     */
    setContent(content: string): void;
    /**
     * Get the content of this file.
     */
    getContent(): string;
    /**
     * Make a HTTP get request.
     */
    static httpGet(url: string): Promise<string>;
    /**
     * Load content from a url.
     */
    loadUrl(): Promise<string>;
    /**
     * Load content from a local file.
     */
    loadLocalFile(): Promise<string>;
    /**
     * Load the contents of the file.
     */
    load(): Promise<string>;
    /**
     * Process string content. This will take in a regular expression and
     * parse the content based on the regex. When the regex content is found
     * contentProcessor will be executed with the regex content found. When
     * the regex content is not found, offContentProcessor will be called with
     * the content outside of the regex.
     *
     * @param content The content to parse.
     * @param contentRegex The regex to use to parse the content.
     * @param contentProcessor The content found inside the regex.
     * @param offContentProcessor The content found outside of the regex.
     * @param numRemoveFromBeginning The number of characters to remove from the
     * beginning of the found content.
     * @param numRemoveFromEnd The number of characters to remove from the end of
     * the found content.
     */
    static processContent(content: string, contentRegex: RegExp, contentProcessor: (regexFound: string) => string, offContentProcessor: (offContent: string) => string, numRemoveFromBeginning?: number, numRemoveFromEnd?: number): string;
    /**
     * Process any content that could have nested values. This will
     * take in a regular expression and
     * parse the content based on the regex. When the regex content is found
     * contentProcessor will be executed with the regex content found. When
     * the regex content is not found, offContentProcessor will be called with
     * the content outside of the regex.
     *
     * @fixme Needs to be able to ignore any characters found inside comments
     * or a string. For example, if the following is used ```${"Test }"}``` It
     * will error out.
     *
     * @param content The content to parse.
     * @param startChars The starting characters to search for.
     * @param endChars The ending characters to search for.
     * @param triggerChar The found character where parsing will start from.
     * @param contentProcessor The content found inside the regex.
     * @param offContentProcessor The content found outside of the regex.
     * @param numRemoveFromBeginning The number of characters to remove from the
     * beginning of the found content.
     * @param numRemoveFromEnd The number of characters to remove from the end of
     * the found content.
     */
    static processNestedContent(content: string, startChars: string, endChars: string, triggerChar: string, contentProcessor: (regexFound: string, startPos: number, endPos: number) => string, offContentProcessor: (offContent: string) => string, numRemoveFromBeginning?: number, numRemoveFromEnd?: number): string;
    /**
     * Parse a function from a string. Ex: <(a, b, c)=>{return (a + b + c);}>
     */
    static parseFunction(str: string, callbackA: (funcArgs: string[]) => void, callbackB: (funcBody: string, endType: string) => string): string;
    /**
     * Process \<hot-dom> blocks.
     */
    static processHotDomBlocks(input: string, quotes?: string): string;
    /**
     * Parse all the content into a single JavaScript file to be executed. async/await is used
     * in the processed JavaScript file, which means the .hott files parsed may use async/await
     * within the code.
     *
     * Will parse the following in order:
     * * <* JavaScript content to execute and output. Will output using Hot.echo. *>
     * * @( Safely creates DOM from HTML content with any user input that was supplied. Any user inputs should be passed using @{input} )
     * * STR{ Execute some JS, and output a string using JSON.stringify. }
     * * ${ Execute some JS, and output the result. }
     * * <(arguments)=>{ Some JS to execute at a later time. }>
     * 	* This entire block will be parsed as a function, and will immediately output "Hot.CurrentPage.callFunction" in its place.
     * * ?( Execute some JS, must return a string which will be attached to the HTML DOM object it's used on. )
     *
     * @param thisContent The content to parse.
     * @param throwAllErrors If set to true, any error that occurs will be thrown as an exception.
     * @param options The options to use when parsing the content.
     */
    static parseContent(thisContent: string, throwAllErrors: boolean, parserOptions?: ParserOptions): string;
    /**
     * Process the content in this file. This treats each file as one large JavaScript
     * file. Any text outside of the <* *> areas will be treated as:
     *
     * 		Hot.echoUnsafe ("text");
     *
     * @fixme The regex's in the offContent functions need to be fixed. There's several
     * test cases where they will fail.
     */
    process(args?: any): Promise<string>;
}
//# sourceMappingURL=HotFile.d.ts.map