import { MetaHTMLElement, MetaHTMLText, MetaHTMLComment, MetaHTMLIf, MetaHTMLVariable, MetaNode } from "../metaComponent/metaComponent"; import { TemplateFiles } from "../types"; import { Props } from "../metaComponent/getProps"; export interface TemplateFormat { dirname: string; templateId: string; onElement: (element: MetaHTMLElement) => string; onText: (text: MetaHTMLText) => void; onComment: (text: MetaHTMLComment) => void; onCloseElement: (closeElement: OnCloseElement) => void; onVariable: (onVariable: MetaHTMLVariable) => OnVariableResponse; onCloseVariable: (closeVariable: MetaHTMLVariable) => void; onIf: (onIf: MetaHTMLIf) => void; onCloseIf: (onCloseIf: MetaHTMLIf) => void; onFinalise: (args: OnFinalise) => void; serialize: () => TemplateFiles; } export declare type OnConstructor = { templateId: string; dirname?: string; props: Props; hasMultipleRootNodes: boolean; }; declare type OnCloseElement = { children: MetaNode[]; openingElement: string; }; declare type OnFinalise = { css: string; }; declare type ShouldNotRenderChildren = true; declare type OnVariableResponse = ShouldNotRenderChildren | void; export declare class Template { dirname: string; templateId: string; props: Props; hasMultipleRootNodes: boolean; constructor(args: OnConstructor); onElement(onElement: Parameters[0]): ReturnType[0]; onCloseElement(args: Parameters[0]): void; onText(onText: Parameters[0]): void; onComment(onComment: Parameters[0]): void; onVariable(onVariable: Parameters[0]): ReturnType; onCloseVariable(onCloseVariable: Parameters[0]): void; onIf(onIf: Parameters[0]): void; onCloseIf(onCloseIf: Parameters[0]): void; onFinalise(onFinalise: Parameters[0]): void; serialize(): TemplateFiles; } export {};