import { ILogger } from 'pargv';
export declare type BeforeRender = {
    (template?: ITemplate, done?: {
        ();
    });
};
export declare type AfterRender = {
    (template?: ITemplate);
};
export declare type NodeCallback = {
    (err?: any, data?: any);
};
export declare type InjectCallback = {
    (line: string, data: string, done: {
        (line: string, data: string);
    });
};
export interface IMetadata {
    component?: string;
    [key: string]: any;
}
export interface IPartials {
    [key: string]: string | ITemplate;
}
export interface ITemplate {
    name?: string;
    ext?: string;
    suffix?: string;
    casing?: 'lower' | 'upper' | 'camel' | 'title' | 'capitalize';
    injects?: any[];
    path?: string;
    pathNormalized?: string;
    metadata?: IMetadata;
    body?: string;
    beforeRender?: BeforeRender;
    afterRender?: AfterRender;
    outputPath?: string;
    raw?: string;
    rendered?: string;
    partials?: IPartials;
    isPartial?: boolean;
}
export interface ITemplates {
    [key: string]: ITemplate;
}
export interface IRegisterOptions {
    name: string;
    template: string;
    partials?: string | string[] | IPartials;
    beforeRender?: BeforeRender;
    afterRender?: AfterRender;
}
export interface IRegister {
    partials(...args: any[]): IRegister;
    partials(partials: string | string[] | IPartials): IRegister;
    beforeRender(beforeRender: BeforeRender): IRegister;
    afterRender(afterRender: AfterRender): IRegister;
}
export interface IInject {
    filename: string;
    find: string | RegExp;
    insert: string | string[];
    strategy: 'before' | 'after' | 'first' | 'last' | 'replace';
    done: NodeCallback;
}
export interface IMustrOptions {
    configDir?: string;
    outputDir?: string;
    templateExt?: string;
}
export interface IMustr {
    cwd: string;
    log: ILogger;
    registerPath: string;
    templatesPath: string;
    outputPath: string;
    templatesGlob: string[];
    templates: ITemplates;
    options: IMustrOptions;
    init(force?: boolean): void;
    load(): IMustr;
    register(options: IRegisterOptions): IRegister;
    register(name: string | IRegisterOptions, template?: string): IRegister;
    configure(name: string, metadata?: IMetadata): ITemplate;
    configure(name: string, output?: string | IMetadata, metadata?: IMetadata): ITemplate;
    render(template: ITemplate, done?: NodeCallback): void;
    render(template: ITemplate, metadata?: IMetadata, done?: NodeCallback): void;
    render(name: string | ITemplate, output?: string | IMetadata | NodeCallback, metadata?: IMetadata | NodeCallback, done?: NodeCallback): void;
    inject(options: IInject, done?: NodeCallback): void;
    inject(filename: string | IInject, find: string | RegExp | NodeCallback, insert: string | string[], strategy: 'before' | 'after' | 'first' | 'last' | 'replace', done?: NodeCallback): void;
    transformCase(str: string, to: string): string;
}
