import { ResolvedNavItemWithLink } from '../../shared/index.js';

type RepoType = 'GitHub' | 'GitLab' | 'Gitee' | 'Bitbucket' | null;
declare function resolveRepoType(repo: string): RepoType;

declare const editLinkPatterns: Record<Exclude<RepoType, null>, string>;
declare function resolveEditLink({ docsRepo, docsBranch, docsDir, filePathRelative, editLinkPattern, }: {
    docsRepo: string;
    docsBranch: string;
    docsDir: string;
    filePathRelative: string | null;
    editLinkPattern?: string;
}): string | null;

/**
 * Resolve NavLink props from string
 *
 * @example
 * - Input: '/README.md'
 * - Output: { text: 'Home', link: '/' }
 */
declare function resolveNavLink(link: string): ResolvedNavItemWithLink;
declare function normalizeLink(base?: string, link?: string): string;
declare function normalizePrefix(base: string, link?: string): string;

declare const EXTERNAL_URL_RE: RegExp;
declare const PATHNAME_PROTOCOL_RE: RegExp;
declare const HASH_RE: RegExp;
declare const EXT_RE: RegExp;
declare const inBrowser: boolean;
declare function toArray<T>(value: T | T[]): T[];
declare function isActive(currentPath: string, matchPath?: string, asRegex?: boolean): boolean;
declare function normalize(path: string): string;
declare function numToUnit(value?: string | number): string;

export { EXTERNAL_URL_RE, EXT_RE, HASH_RE, PATHNAME_PROTOCOL_RE, type RepoType, editLinkPatterns, inBrowser, isActive, normalize, normalizeLink, normalizePrefix, numToUnit, resolveEditLink, resolveNavLink, resolveRepoType, toArray };
