import { UtamFilter, UtamSelector } from '@utam/types'; import { FilterApplicationForIndexAST, BaseDeclarationAST } from './helpers/block-declarations-generator'; export type PickRequired = T & Required>; export interface HoistedFunctionDeclarationContext { isContainer?: boolean; insideShadow?: boolean; elementName: string; nullable?: boolean; parentName?: string; parentNullable?: boolean; parentArgs?: string[]; parentSelectorReturnsList?: boolean; /** name of the hoisted filter function */ filterFunctionIdentifier?: string; /** name of the hoisted filter application function used for nested elements */ parentFilterApplicationName?: string; } export declare class BlockDeclarations { imports: Map>; private _selectorDeclarations; private _selectorDeclarationsNames; private _filterDeclarations; private _indexDeclarations; private _filterApplicationDeclarations; private _byIdentifier?; private _insideShadowIdentifier?; addSelectorFunctionDeclaration(selector: UtamSelector, opts: HoistedFunctionDeclarationContext): string; addFilterFunctionDeclaration(filter: UtamFilter, opts: HoistedFunctionDeclarationContext): string; addIndexFunctionDeclaration(opts: HoistedFunctionDeclarationContext, indexArgName: string, selectorMethod: BaseDeclarationAST, filterMethod?: FilterApplicationForIndexAST): string; /** * Generates the name of the hoisted function that apply a filter to a parent element and push the required * information for code generation in the AST. * * @param filter element filter object coming from the JSON page object * @param opts context that holds the information to push in the AST * @returns the name of function that applies the filter to the parent elements */ addFilterApplicationFunctionDeclaration(filter: UtamFilter, opts: PickRequired): string; addImport(module: string, name: string): string; render(): string; } //# sourceMappingURL=block-declarations.d.ts.map