import { PureContainerBase, PureContainerConfig } from "./PureContainer"; import { RenderingContext } from "./RenderingContext"; import { BooleanProp, StructuredProp, ResolvePropType } from "./Prop"; import { Instance } from "./Instance"; /** * Configuration for ContentResolver widget. * * The params type parameter enables type inference for the onResolve callback: * - Literal values (numbers, strings, booleans) preserve their types * - AccessorChain resolves to T * - Bind/Tpl/Expr resolve to any (type cannot be determined at compile time) * - Structured props (objects) have each property resolved individually * * @example * ```typescript * // Structured params (object) * -> string * }} * onResolve={(params) => { * // params.count is number, params.name is string * }} * /> * * // Simple param (single value) * * onResolve={(name) => { * // name is string * }} * /> * ``` */ export interface ContentResolverConfig

extends PureContainerConfig { /** Parameters that trigger content resolution when changed. Can be a structured object or a single Prop. */ params?: P; /** * Callback function that resolves content based on params. Can return content directly or a Promise. * The params type is inferred from the params property - literal values and AccessorChain * preserve their types, while bindings (bind/tpl/expr) resolve to `any`. */ onResolve?: string | ((params: ResolvePropType

, instance: Instance) => any); /** How to combine resolved content with initial content. Default is 'replace'. */ mode?: "replace" | "prepend" | "append"; /** Indicates if content is being loaded. */ loading?: BooleanProp; } export declare class ContentResolver

extends PureContainerBase> { constructor(config?: ContentResolverConfig

); mode: "replace" | "prepend" | "append"; onResolve?: string | ((params: ResolvePropType

, instance: Instance) => any); initialItems: any; declareData(...args: any[]): void; init(): void; initInstance(context: RenderingContext, instance: any): void; prepareData(context: RenderingContext, instance: any): void; setContent(instance: any, content: any): void; explore(context: RenderingContext, instance: any): void; } //# sourceMappingURL=ContentResolver.d.ts.map