import React from "react";
import { AnalysisResponseEntry, AnalysisToken, SearchToken } from "./client";
import { queryStringMapType, queryStringValues } from "../embeddable/entry";
type Range = [number, number];
export declare function useSelections({ useKeycloak, persistInQueryString, localStorageKey, defaultString, queryStringValues, queryStringMap, }: {
    useKeycloak?: boolean;
    persistInQueryString?: boolean;
    localStorageKey?: string;
    defaultString?: string;
    queryStringValues: queryStringValues;
    queryStringMap?: queryStringMapType;
}): readonly [SelectionsState, React.Dispatch<SelectionsAction>];
export type SelectionsState = {
    text: string;
    selection: Array<Selection>;
    textOnChange: string;
    filters: SearchToken[];
    range: Range;
    commitId: number;
};
export type SelectionsAction = {
    type: "set-text";
    text: string;
    textOnchange: string;
    pageSize?: number;
} | {
    type: "set-text-btn";
    textOnchange: string;
} | {
    type: "reset-search";
} | {
    type: "set-selection";
    replaceText: boolean;
    selection: Selection;
    textEntity?: string;
} | {
    type: "remove-filter";
    filter: SearchToken;
} | {
    type: "set-filters";
    filter: SearchToken;
} | {
    type: "set-all-filters";
    filter: SearchToken[];
} | {
    type: "reset-filters";
} | {
    type: "set-range";
    range: Range;
} | {
    type: "set-page-size";
    pageSize: number;
};
export type Selection = {
    text: string;
    textOnChange: string;
    start: number;
    end: number;
    token: AnalysisToken | null;
    isAuto: boolean;
};
export declare function getAutoSelections(selection: Array<{
    text: string;
    start: number;
    end: number;
    token: AnalysisToken | null;
}>, entries: Array<AnalysisResponseEntry>): {
    text: string;
    start: number;
    end: number;
    token: ({
        tokenType: "DOCTYPE";
        value: string;
        label: string;
    } & {
        score: number;
    }) | ({
        tokenType: "DATASOURCE";
        value: string;
        label: string;
    } & {
        score: number;
    }) | ({
        tokenType: "ENTITY";
        entityType: string;
        entityName: string;
        keywordKey?: string;
        value: string;
        label: string;
    } & {
        score: number;
    }) | ({
        tokenType: "TEXT";
        keywordKey?: string;
        keywordName?: string;
        value: string;
        label: string;
        extra?: {
            boost?: string;
            fuzziness?: string;
        };
    } & {
        score: number;
    }) | ({
        tokenType: "FILTER";
        keywordKey?: string;
        keywordName?: string;
        value: string;
        label: string;
    } & {
        score: number;
    });
    isAuto: boolean;
}[];
export declare function isOverlapping<A extends {
    start: number;
    end: number;
}, B extends {
    start: number;
    end: number;
}>(a: A, b: B): boolean;
export {};
