import { MutableRefObject } from 'react'; import { FloatingLayoutInvalidationFlag, FloatingCardLayoutInput } from './comment-floating-layout'; import { CommentFloatingCard } from './context/types'; import { FloatingCardRuntimeState } from './floating-comment-layout-utils'; interface SyncMountedFloatingCardIdsResult { didChange: boolean; previousMountedFloatingCardIds: Set; } export interface UseFloatingCardStateResult { floatingCardStateRef: MutableRefObject>; orderedFloatingCardIdsRef: MutableRefObject; orderDirtyRef: MutableRefObject; heightMeasurementQueueRef: MutableRefObject>; layoutBoundaryRef: MutableRefObject<{ recomputeFromIndex: number; }>; mountedFloatingCardIdsRef: MutableRefObject; mountedFloatingCardIds: string[]; getFloatingCardRuntimeState: (floatingCardId: string) => FloatingCardRuntimeState; getOrderedFloatingCardIndex: (floatingCardId: string) => number | null; markRecomputeFromIndex: (recomputeFromIndex: number) => void; markFloatingCardInvalidated: (floatingCardId: string, flag: FloatingLayoutInvalidationFlag) => void; markFloatingCardOrderDirty: () => void; reconcileFloatingCardOrder: (nextFloatingCards: CommentFloatingCard[]) => { orderedFloatingCardIds: string[]; firstChangedIndex: number | null; }; pruneFloatingCardRuntimeState: (activeFloatingCardIds: Set) => void; syncMountedFloatingCardIds: (nextMountedFloatingCardIds: string[]) => SyncMountedFloatingCardIdsResult; clearInvalidationFlagsThroughIndex: (stopIndex: number) => void; getFloatingCardLayoutInputs: () => FloatingCardLayoutInput[]; resetFloatingCardState: () => void; } export declare const useFloatingCardState: () => UseFloatingCardStateResult; export {};