import type { DocAnalytics } from '@diplodoc/client';
import type { IDGeneratorStrategy } from '@diplodoc/utils';
import type { NeuroExpertBase, NeuroExpertConfig } from './features/neuro-expert';
import type { BaseArgs as ProgramArgs, BaseConfig as ProgramConfig } from "../../core/program";
import type { VarsService } from "../../core/vars";
import type { Config } from "../../core/config";
import type { TemplatingArgs, TemplatingConfig, TemplatingRawConfig } from './features/templating';
import type { ContributorsArgs, ContributorsConfig } from './features/contributors';
import type { SinglePageArgs, SinglePageConfig } from './features/singlepage';
import type { PdfPageArgs } from './features/pdf-page';
import type { SkipHtmlArgs, SkipHtmlConfig } from './features/skip-html';
import type { LintArgs, LintConfig, LintRawConfig } from './features/linter';
import type { OutputMdConfig, PreprocessConfig } from './features/output-md';
import type { BuildManifestArgs, BuildManifestConfig } from './features/build-manifest';
import type { BuildStatsArgs, BuildStatsConfig } from './features/build-stats';
import type { BuildContentMapArgs, BuildContentMapConfig } from './features/build-content-map';
import type { CrawlerManifestArgs, CrawlerManifestConfig } from './features/crawler-manifest';
import type { ChangelogsArgs, ChangelogsConfig } from './features/changelogs';
import type { SearchArgs, SearchConfig, SearchRawConfig } from './features/search';
import type { LegacyArgs, LegacyConfig, LegacyRawConfig } from './features/legacy';
import type { CustomResourcesArgs, CustomResourcesConfig } from './features/custom-resources';
import type { TocFilteringArgs, TocFilteringConfig } from './features/toc-filtering';
import type { CodeHighlightConfig, ThemerArgs, ThemerConfig } from './features/themer';
import type { WatchArgs, WatchConfig } from './features/watch';
import type { YaMakeArgs, YaMakeConfig } from './features/ya-make';
import type { LlmsArgs, LlmsConfig } from './features/llms';
import type { OutputFormat } from './config';
import type { TransformConfig } from './run';
import type { EntryService, LeadingData, MarkdownData, PageData } from './services/entry';
export type { SearchProvider, SearchServiceConfig } from './services/search';
export type { EntryData, PageData } from './services/entry';
export { OutputFormat, TransformConfig };
type BaseArgs = {
    output: AbsolutePath;
};
type ExtendedLang = {
    lang: string;
    tld?: string;
    href?: string;
};
export type Langs = (string | ExtendedLang)[];
export type ContentConfig = {
    maxInlineSvgSize: number;
    maxHtmlSize: number;
    maxAssetSize: number;
    maxOpenapiIncludeSize: number;
    /**
     * Max size (bytes) of the OpenAPI spec embedded inline on the leading page.
     * If exceeded, `leadingPage.spec.renderMode: inline` auto-switches to `link`.
     * Default 100K, hard-capped at 1M. 0 means always render as a link.
     */
    maxOpenapiIncludeInlineSize: number;
    multilineTermDefinitions: boolean;
};
/**
 * Controls emission of the standalone OpenAPI spec companion (`*.openapi.json`):
 *  - `true` — emit in both md2md and md2html;
 *  - `'md'` — emit only in md2md (default);
 *  - `false` — disabled.
 *
 * `undefined` means "not configured": the default (`'md'`) is owned and applied by the
 * openapi extension (`DEFAULT_OPENAPI_COMPANIONS_MODE`), the single consumer of this value.
 */
export type AiConfig = {
    openapiCompanions?: boolean | 'md';
};
/** Maps a generated OpenAPI leading page to its standalone spec companion file. */
export type OpenapiCompanionEntry = {
    /** Lang-relative path of the leading page (without extension), e.g. `ru/api/index`. */
    leadingPage: string;
    /**
     * Lang-relative path of the companion file. The file name is derived from the source spec
     * (`petstore.yaml` -> `petstore.openapi.json`), so it is not necessarily `index.openapi.json`,
     * e.g. `ru/api/petstore.openapi.json`. The viewer must use this exact path.
     */
    companionPath: string;
};
export type { IDGeneratorStrategy };
type BaseConfig = {
    lang: string;
    langs: Langs;
    outputFormat: `${OutputFormat}`;
    varsPreset: string;
    vars: Hash;
    allowHtml: boolean;
    sanitizeHtml: boolean;
    breaks?: boolean;
    linkify?: boolean;
    linkifyTlds?: string | string[];
    ignoreStage: string[];
    ignore: string[];
    rawAddMeta: boolean;
    addSystemMeta: boolean;
    addResourcesMeta: boolean;
    addMetadataMeta: boolean;
    addAlternateMeta: boolean;
    addMapFile: boolean;
    mergeIncludes: boolean;
    staticContent: boolean;
    analytics: DocAnalytics;
    supportGithubAnchors?: boolean;
    interface?: Record<string, boolean>;
    feedback?: {
        url?: string;
    };
    pdf: Record<string, boolean>;
    neuroExpert?: NeuroExpertBase;
    disableCsp?: boolean;
    pdfDebug: boolean;
    content: ContentConfig;
    ai: AiConfig;
    codeHighlight?: CodeHighlightConfig | null;
    codeLineWrapping?: boolean;
    /**
     * Strategy for generating element IDs (tabs, terms, code blocks, etc.).
     * - 'random' (default): uses Math.random() — legacy behavior.
     * - 'deterministic': uses per-file counters with prefix (e.g. 'term-1').
     */
    idGenerator: IDGeneratorStrategy;
};
export type VcsArgs = {
    vcs: boolean;
    vcsToken: string;
};
export type WorkerArgs = {
    workerMaxOldSpace: number;
};
export type BuildArgs = ProgramArgs & BaseArgs & Partial<TemplatingArgs & ContributorsArgs & SinglePageArgs & PdfPageArgs & SkipHtmlArgs & LintArgs & BuildManifestArgs & BuildStatsArgs & BuildContentMapArgs & CrawlerManifestArgs & PreprocessConfig & ChangelogsArgs & SearchArgs & LegacyArgs & CustomResourcesArgs & TocFilteringArgs & VcsArgs & WorkerArgs & WatchArgs & YaMakeArgs & ThemerArgs & LlmsArgs>;
export type BuildRawConfig = BaseArgs & ProgramConfig & BaseConfig & TemplatingRawConfig & ContributorsConfig & SinglePageConfig & SkipHtmlConfig & LintRawConfig & OutputMdConfig & ChangelogsConfig & SearchRawConfig & LegacyRawConfig & CustomResourcesConfig & TocFilteringConfig & PreprocessConfig & WatchConfig & ThemerConfig & NeuroExpertConfig & LlmsConfig;
export type BuildConfig = Config<BaseArgs & ProgramConfig & BaseConfig & TemplatingConfig & ContributorsConfig & SinglePageConfig & SkipHtmlConfig & LintConfig & BuildManifestConfig & BuildStatsConfig & BuildContentMapConfig & CrawlerManifestConfig & OutputMdConfig & ChangelogsConfig & SearchConfig & LegacyConfig & CustomResourcesConfig & TocFilteringConfig & PreprocessConfig & WatchConfig & YaMakeConfig & ThemerConfig & NeuroExpertConfig & LlmsConfig & ContentConfig>;
export type EntryInfo<Extras extends LeadingData | MarkdownData = LeadingData | MarkdownData> = PageData<Extras> & {
    entryGraph: EntryService['relations'];
    varsGraph: VarsService['relations'];
};
