import { VNode } from '../stencil-public-runtime';
import { JSXBase } from '../stencil-public-runtime';
/** A JSX `createElement` function passed to rendering functions.
 * You can use this to create markup outside of JSX environments
 * e.g. https://reactjs.org/docs/react-without-jsx.html */
interface HFunc<T> {
    (tag: any): T;
}
interface HFunc<T> {
    (tag: any, data: any): T;
}
interface HFunc<T> {
    (tag: any, text: string): T;
}
interface HFunc<T> {
    (sel: any, children: Array<T | undefined | null>): T;
}
interface HFunc<T> {
    (sel: any, data: any, text: string): T;
}
interface HFunc<T> {
    (sel: any, data: any, children: Array<T | undefined | null>): T;
}
interface HFunc<T> {
    (sel: any, data: any, children: T): T;
}
type LibJSX = Record<string, any>;
type JSXRender = VNode | VNode[] | LibJSX | LibJSX[];
type TplReturn = JSXRender | string | Element | undefined;
type TplResult = TplReturn | Promise<string>;
type DropFirst<T extends unknown[]> = T extends [any, ...infer U] ? U : never;
export type CustomRenderer = (node: any, cell: HTMLElement | DocumentFragment) => void | Promise<string>;
export type TemplateFunc<T> = (createElement: HFunc<JSXRender>, props?: T) => TplResult;
type TemplateCall = (...args: any) => TplResult;
type WrapProps<T extends TemplateCall> = {
    parentTag: string;
    attrs?: JSXBase.HTMLAttributes;
    template: T;
    args?: DropFirst<Parameters<T>>;
};
/**
 * A functional component to handle custom rendering.
 * Usage:
 *  @Prop() template = (_createElement: typeof h, exampleArg1: number, exampleArg2: boolean) => { if (exampleArg1) return <button>yay</button }
 *  // Optional
 * @Prop() customRenderer: CustomRenderer
 *
 * <CustomRender
 *   parentTag='div'
 *   attrs={{ onClick: e => this.handleClick(e), class: 'button-wrapper' }}
 *   template={this.template}
 *   args={[3, true]}
 * />
 *
 * @param props - renderer template function, arguments to pass to the renderer function, parental wrapper tag (and attributes)
 * @param children - other virtual nodes to render
 * @returns a jsx vnode
 */
export declare function CustomRender<T extends TemplateCall>(props: WrapProps<T>, children?: any): VNode;
export {};
