import * as React from "react";
import type { DOMHighlight, DOMHighlightSet, SerializedHighlightSet, DOMRange } from "./types";
type Props = {
    children?: React.ReactElement<any>;
    editable: boolean;
    enabled: boolean;
    onSerializedHighlightsUpdate: (serializedHighlights: SerializedHighlightSet) => unknown;
    serializedHighlights: SerializedHighlightSet;
};
type State = {
    wordRanges: ReadonlyArray<DOMRange>;
};
declare class HighlightableContent extends React.PureComponent<Props, State> {
    _container: HTMLElement | null | undefined;
    _content: HTMLElement | null | undefined;
    state: State;
    _buildHighlight(highlightRange: DOMRange): DOMHighlight | null | undefined;
    /**
     * Take the highlights from props, and deserialize them into DOMHighlights,
     * according to the latest cache of word ranges.
     */
    _getDOMHighlights(): DOMHighlightSet;
    /**
     * Add the given DOMHighlight to the current set.
     */
    _handleAddHighlight: (highlight: DOMHighlight) => void;
    /**
     * Remove the given highlight from the list, and call our callback with the
     * new set of highlights.
     */
    _handleRemoveHighlight: (keyToRemove: string) => void;
    /**
     * When our WordIndexer sends us a new cache of word ranges, store it in
     * our component state.
     */
    _handleWordsUpdate: (wordRanges: ReadonlyArray<DOMRange>) => void;
    render(): React.ReactNode;
}
export default HighlightableContent;
