import { AttachmentsService } from '@xwiki/platform-attachments-api';
import { DocumentService } from '@xwiki/platform-document-api';
import { LinkSuggestService, LinkType } from '@xwiki/platform-link-suggest-api';
import { ModelReferenceHandler, ModelReferenceParser, ModelReferenceSerializer } from '@xwiki/platform-model-reference-api';
import { RemoteURLParser, RemoteURLSerializer } from '@xwiki/platform-model-remote-url-api';
/**
 * @since 18.0.0RC1
 * @beta
 */
type LinkEditionContext = {
    linkSuggestService: LinkSuggestService | null;
    modelReferenceParser: ModelReferenceParser;
    modelReferenceSerializer: ModelReferenceSerializer;
    modelReferenceHandler: ModelReferenceHandler;
    remoteURLParser: RemoteURLParser;
    remoteURLSerializer: RemoteURLSerializer;
    attachmentsService: AttachmentsService;
    documentService: DocumentService;
};
/**
 * Describe a link suggestion action (i.e., a search result entry).
 *
 * @since 18.0.0RC1
 * @beta
 */
type LinkSuggestion = {
    title: string;
    segments: string[];
    reference: string;
    url: string;
    type: LinkType;
};
/**
 * Shape of a function providing a list of link suggestions for a given query
 *
 * @since 18.0.0RC1
 * @beta
 */
type LinkSuggestor = (params: {
    query: string;
}) => Promise<LinkSuggestion[]>;
/**
 * Build a function returning an array of link suggestions from a string.
 *
 * @returns `null` if the context does not contain a link suggestion service
 *
 * @since 18.0.0RC1
 * @beta
 */
declare function createLinkSuggestor({ linkSuggestService, modelReferenceParser, }: LinkEditionContext): LinkSuggestor | null;
export { createLinkSuggestor };
export type { LinkEditionContext, LinkSuggestion, LinkSuggestor, LinkType };
