export type TemplateCondition = (item: ItemType) => boolean; export interface Template { /** * 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[]; /** * 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 interface TemplatesManager { registerTemplates(...newTemplates: Template[]): void; selectTemplate(item: ItemType): TemplateContent | null; selectLinkTemplate(item: ItemType): LinkTemplateContent | null; } export declare function buildTemplatesManager(): TemplatesManager;