import { ReactElement } from "react"; import { TriggerSelector, Variable, VariableMap, AnnotationLibrary, Doc } from "../../../types"; import AnnotationManager from "../functions/AnnotationManager"; /** * This hook is an absolute monster, as it takes care of a lot of moving parts. * Basically, everything surrounding the popups for selecting and editing codes, and updating the annotations * Please don't touch it untill I get around to refactoring it, and then still don't touch it unless strictly needed * * The weirdest (but nice) part is that it returns a popup component, as well as a 'trigger' function. * The trigger function can then be used to trigger a popup for starting a selection or edit for a given token index (position of popup) * and selection (which span to create/edit) * * @param {*} tokens * @param {*} variableMap * @param {*} editMode * @param {*} variables * @param {*} annotations * @param {*} setAnnotations * @param {*} codeHistory * @param {*} setCodeHistory * @returns */ declare const useSpanSelector: (doc: Doc, annotationLib: AnnotationLibrary, annotationManager: AnnotationManager, variableMap: VariableMap, editMode: boolean, variables: Variable[]) => [ReactElement, TriggerSelector, boolean]; export default useSpanSelector;