import { BfcacheSegmentIdentity } from "./bfcache-identity.js";
import { AppElements, AppElementsWire } from "./app-elements-wire.js";
import "./app-elements.js";
import { BfcacheIdMap } from "./app-history-state.js";
//#region src/server/app-bfcache-identity.d.ts
type BfcacheSegmentIdentityMap = Readonly<Record<string, BfcacheSegmentIdentity>>;
type InitialBfcacheMaps = Readonly<{
  bfcacheIds: BfcacheIdMap;
  identities: BfcacheSegmentIdentityMap;
}>;
type AppElementsMetadata = ReturnType<typeof AppElementsWire.readMetadata>;
declare function createInitialBfcacheIdMap(elements: AppElements): BfcacheIdMap;
declare function createBfcacheSegmentIdentityMap(options: {
  elements: AppElements;
}): BfcacheSegmentIdentityMap;
declare function createInitialBfcacheMaps(options: {
  elements: AppElements;
  metadata: AppElementsMetadata;
}): InitialBfcacheMaps;
declare function createNextBfcacheIdMap(options: {
  current: BfcacheIdMap;
  currentElements: AppElements;
  elements: AppElements;
  restored?: BfcacheIdMap | null;
  reuseCurrent?: boolean;
}): BfcacheIdMap;
declare function preserveBfcacheIdsForMergedElements(options: {
  elements: AppElements;
  next: BfcacheIdMap;
  previous: BfcacheIdMap;
  preservedElementIds?: readonly string[];
  preservePreviousIds?: readonly string[];
}): BfcacheIdMap;
//#endregion
export { BfcacheSegmentIdentityMap, InitialBfcacheMaps, createBfcacheSegmentIdentityMap, createInitialBfcacheIdMap, createInitialBfcacheMaps, createNextBfcacheIdMap, preserveBfcacheIdsForMergedElements };