import type { RuntimeTypedElementAttributes, SerializableValue } from '../../protocol/types.js';
export type ETListItemPlatformInfo = Record<string, SerializableValue>;
export interface ETListItemMeta {
    templateKey: string;
    platformInfo: ETListItemPlatformInfo;
}
interface ETListItemRecord extends ETListItemMeta {
    uid: number;
    ref: ElementRef;
    attached: boolean;
    needsAttachMove: boolean;
    skipNextEnqueue: boolean;
}
interface ETListCallbacks {
    componentAtIndex: ComponentAtIndexCallback;
    componentAtIndexes: ComponentAtIndexesCallback;
    enqueueComponent: EnqueueComponentCallback;
}
export interface ETListState {
    listHandleId: number | null;
    holderRef: ElementRef | null;
    items: ETListItemRecord[];
    callbackItemBySign: Map<number, ETListItemRecord>;
    destroyed: boolean;
    hasAttachedMoves: boolean;
    attributes: RuntimeTypedElementAttributes;
    callbacks: ETListCallbacks;
}
export interface ETListUpdateItem extends ETListItemMeta {
    uid: number;
    ref: ElementRef;
}
export interface ETListUpdateInfo {
    insertAction: Array<{
        position: number;
        type: string;
    } & ETListItemPlatformInfo>;
    removeAction: number[];
    updateAction: Array<{
        from: number;
        to: number;
        type: string;
        flush: boolean;
    } & ETListItemPlatformInfo>;
}
export interface ETListFlushResult {
    uid: number;
    attributes: RuntimeTypedElementAttributes;
    removedSubtreeHandleIds?: number[];
}
export declare function registerElementTemplateListItem(uid: number, ref: ElementRef, meta: ETListItemMeta): void;
export declare function createElementTemplateListState(listItemUids: readonly number[], attributes?: RuntimeTypedElementAttributes | null): ETListState;
export declare function createElementTemplateListInitialUpdateInfo(state: ETListState): ETListUpdateInfo;
export declare function createElementTemplateListStateFromItems(items: ETListUpdateItem[], attributes?: RuntimeTypedElementAttributes | null): ETListState;
export declare function registerElementTemplateListState(uid: number, state: ETListState, needsInitialFlush: boolean, holderRef: ElementRef): void;
export declare function markElementTemplateListDestroyed(uid: number): number[] | undefined;
export declare function destroyAllElementTemplateListStates(): void;
export declare function updateElementTemplateListAttributes(uid: number, attributes: RuntimeTypedElementAttributes | null | undefined, updateListInfo?: ETListUpdateInfo): RuntimeTypedElementAttributes | null;
export declare function insertElementTemplateListItem(uid: number, item: ETListUpdateItem, beforeUid: number): void;
export declare function removeElementTemplateListItem(uid: number, itemUid: number, removedSubtreeHandleIds: readonly number[]): void;
export declare function updateElementTemplateListItem(uid: number, item: ETListUpdateItem): void;
export declare function flushPendingElementTemplateListUpdates(): ETListFlushResult[];
export declare function flushInitialElementTemplateListUpdates(): ETListFlushResult[];
export declare function composeElementTemplateListAttributes(attributes: RuntimeTypedElementAttributes | null | undefined, state: ETListState, updateListInfo?: ETListUpdateInfo): RuntimeTypedElementAttributes;
export {};
