/**
 * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
 * Any changes made here should be mirrored there.
 * Ticket for dedeplication: https://product-fabric.atlassian.net/browse/EDM-7138
 * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
 */
import LinkifyIt from 'linkify-it';
/**
 * Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
 */
export declare const isSafeUrl: (url: string | undefined) => boolean;
export interface Match {
    index: number;
    input?: string;
    lastIndex: number;
    length?: number;
    raw: string;
    schema: string;
    text: string;
    url: string;
}
export declare const linkify: LinkifyIt.LinkifyIt;
export declare const LINK_REGEXP: RegExp;
/** Attempt to find a link match using a regex string defining a URL */
export declare const linkifyMatch: (text: string) => Match[];
/**
 * Attempt to find a link match. Tries to use our regex search first.
 * If this doesn't match (e.g. no protocol), try using linkify-it library.
 * Returns null if url string empty or no string given, or if no match found.
 */
export declare function getLinkMatch(str?: string): Match | null;
/**
 * Adds protocol to url if needed.
 * Returns empty string if no url given or if no link match found.
 */
export declare function normalizeUrl(url?: string): string;
/**
 * checks if root relative link
 */
export declare function isRootRelative(url: string): boolean;
