import { Schema } from '@coveo/bueno';
export type TemplateCondition<ItemType> = (item: ItemType) => boolean;
export interface Template<ItemType, Content = unknown, LinkContent = unknown> {
    /**
     * The stored content of the template.
     */
    content: Content;
    /**
     * The link used when an item generated by this template is clicked in a card layout.
     */
    linkContent?: LinkContent;
    /**
     * A list of conditions that must be fulfilled for this template to be selected.
     */
    conditions: TemplateCondition<ItemType>[];
    /**
     * A value which the manager will use to determine which template to select when an item satisfies the conditions of more than one template.
     * Templates with higher priority values will be selected over others. The minimum and default value is `0`.
     */
    priority?: number;
    /**
     * A list of index fields that are necessary to render the template.
     */
    fields?: string[];
}
export declare const templateSchema: Schema<{
    content: unknown;
    conditions: unknown;
    priority: number;
    fields: import("@coveo/bueno").PrimitivesValues[] | null | undefined;
}>;
export interface TemplatesManager<ItemType, TemplateContent = unknown, LinkTemplateContent = unknown> {
    registerTemplates(...newTemplates: Template<ItemType, TemplateContent>[]): void;
    selectTemplate(item: ItemType): TemplateContent | null;
    selectLinkTemplate(item: ItemType): LinkTemplateContent | null;
}
export declare function buildTemplatesManager<ItemType, TemplateContent = unknown, LinkTemplateContent = unknown>(): TemplatesManager<ItemType, TemplateContent, LinkTemplateContent>;
