import type { RumConfiguration } from '@datadog/browser-rum-core';
import type { BrowserIncrementalSnapshotRecord } from '../../../types';
import type { ShadowRootsController } from '../shadowRootsController';
import type { Tracker } from './tracker.types';
export type MutationCallBack = (incrementalSnapshotRecord: BrowserIncrementalSnapshotRecord) => void;
interface RumCharacterDataMutationRecord {
    type: 'characterData';
    target: Node;
    oldValue: string | null;
}
interface RumAttributesMutationRecord {
    type: 'attributes';
    target: Element;
    oldValue: string | null;
    attributeName: string | null;
}
interface RumChildListMutationRecord {
    type: 'childList';
    target: Node;
    addedNodes: NodeList;
    removedNodes: NodeList;
}
export type RumMutationRecord = RumCharacterDataMutationRecord | RumAttributesMutationRecord | RumChildListMutationRecord;
export type MutationTracker = Tracker & {
    flush: () => void;
};
/**
 * Buffers and aggregate mutations generated by a MutationObserver into MutationPayload
 */
export declare function trackMutation(mutationCallback: MutationCallBack, configuration: RumConfiguration, shadowRootsController: ShadowRootsController, target: Node): MutationTracker;
export declare function sortAddedAndMovedNodes(nodes: Node[]): void;
export {};
