import { AppElementValue, AppElements, UNMATCHED_SLOT } from "../server/app-elements-wire.js";
import "../server/app-elements.js";
import * as React$1 from "react";
//#region src/shims/slot.d.ts
/**
 * Holds resolved AppElements (not a Promise). React 19's use(Promise) during
 * hydration triggers "async Client Component" for native Promises that lack
 * React's internal .status property. Storing resolved values sidesteps this.
 */
declare const ElementsContext: React$1.Context<Readonly<Record<string, AppElementValue>>>;
declare const ChildrenContext: React$1.Context<React$1.ReactNode>;
declare const ParallelSlotsContext: React$1.Context<Readonly<Record<string, React$1.ReactNode>> | null>;
declare const BfcacheIdentityMapContext: React$1.Context<Readonly<Record<string, string>>>;
type BfcacheSlotEntry = {
  content: React$1.ReactNode;
  elements?: AppElements;
  segmentId?: string;
  stateKey: string;
  stateKeyMap?: Readonly<Record<string, string>>;
};
type MergeElementsOptions = {
  clearAbsentSlots?: boolean;
  preserveAbsentSlots?: boolean;
  preserveElementIds?: readonly string[];
  preservePreviousSlotIds?: readonly string[];
};
declare function updateBfcacheSlotEntryOrder(previousOrder: readonly string[], activeStateKey: string, maxEntries?: number): string[];
declare function stageBfcacheSlotEntryForRender(committedSnapshots: ReadonlyMap<string, BfcacheSlotEntry>, committedOrder: readonly string[], activeEntry: BfcacheSlotEntry, maxEntries?: number): Readonly<{
  entries: BfcacheSlotEntry[];
  order: string[];
  snapshots: Map<string, BfcacheSlotEntry>;
}>;
/**
 * Adds a nested segment-owned Activity cache inside a flattened AppElements
 * entry. Named parallel routes are transported as one slot value, but Next.js
 * retains each descendant segment independently. This boundary recreates that
 * ownership without requiring a separate wire entry for every nested segment.
 */
declare function BfcacheSegmentBoundary({ children, id, stateKey }: {
  children: React$1.ReactNode;
  id: string;
  stateKey: string;
}): React$1.JSX.Element;
declare function getNonCacheComponentsSegmentKey(id: string, activeStateKey: string): string | undefined;
declare function resolveBfcacheSegmentStateKey(id: string, identityMap: Readonly<Record<string, string>>, bfcacheIdMap: Readonly<Record<string, string>> | null): string | undefined;
declare function mergeElements(prev: AppElements, next: AppElements, options?: MergeElementsOptions | boolean): AppElements;
declare function Slot({ id, children, parallelSlots }: {
  id: string;
  children?: React$1.ReactNode;
  parallelSlots?: Readonly<Record<string, React$1.ReactNode>>;
}): React$1.JSX.Element | null;
declare function Children(): React$1.ReactNode;
declare function ParallelSlot({ name }: {
  name: string;
}): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React$1.ReactNode> | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | React$1.ReactPortal | null | undefined> | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | null;
//#endregion
export { BfcacheIdentityMapContext, BfcacheSegmentBoundary, BfcacheSlotEntry, Children, ChildrenContext, ElementsContext, ParallelSlot, ParallelSlotsContext, Slot, UNMATCHED_SLOT, getNonCacheComponentsSegmentKey, mergeElements, resolveBfcacheSegmentStateKey, stageBfcacheSlotEntryForRender, updateBfcacheSlotEntryOrder };