import type { Chunk, TagChunk } from "@speakeasy-api/docs-md-shared";
import type { DisplayTypeInfo, PageMetadata, PillVariant, PropertyAnnotations } from "@speakeasy-api/docs-md-shared";
import type { CodeSampleLanguage } from "../settings.ts";
import type { FrameworkConfig, PageFrontMatter } from "../types/FrameworkConfig.ts";
import type { EscapeOptions } from "./util.ts";
type ContextType = "operation" | "section" | "schema" | "embed";
export type Context = {
    id: string;
    type: ContextType;
};
export type SiteCreatePageArgs = [
    path: string,
    slug?: string,
    frontMatter?: PageFrontMatter
];
export type SiteCreateEmbedArgs = [
    options: {
        slug: string;
        embedTitle: string;
        triggerText: string;
        createdEmbeddedContent: (renderer: Renderer) => void;
    }
];
export type SiteBuildPagePathArgs = [
    slug: string,
    options?: {
        appendIndex?: boolean;
    }
];
export type SiteGetRendererArgs = [args: RendererConstructorArgs];
export declare abstract class Site {
    abstract setDocsData(docsData: Map<string, Chunk>): void;
    abstract createPage(...args: SiteCreatePageArgs): Renderer;
    abstract createEmbed(...args: SiteCreateEmbedArgs): string | undefined;
    abstract buildPagePath(...args: SiteBuildPagePathArgs): string;
    protected abstract getRenderer(...args: SiteGetRendererArgs): Renderer;
}
export type RendererConstructorArgs = {
    site: Site;
    docsData: Map<string, Chunk>;
    currentPagePath: string;
    currentPageSlug?: string;
    compilerConfig: FrameworkConfig;
    frontMatter?: PageFrontMatter;
    isEmbed: boolean;
};
export type RendererCreateTagSectionArgs = [
    {
        title: () => void;
        description?: () => void;
    }
];
export type RendererCreateOperationArgs = [
    options: {
        tag: TagChunk;
        method: string;
        path: string;
        operationId: string;
        summary: string | null;
        description: string | null;
    },
    cb: () => void
];
export type RendererCreateCodeSamplesSectionArgs = [
    cb: (options: {
        createTryItNowEntry: (options: {
            language: CodeSampleLanguage;
            externalDependencies: Record<string, string>;
            defaultValue: string;
            packageManagerUrl?: string;
        }) => void;
        createCodeSampleEntry: (options: {
            language: CodeSampleLanguage;
            value: string;
        }) => void;
    }) => void
];
export type RendererCreateSecuritySectionArgs = [cb: () => void];
export type RendererCreateParametersSectionArgs = [cb: () => void];
export type RendererCreateRequestExamplesSectionArgs = [
    options: {
        createExample: () => void;
        title: string;
    }
];
export type RendererCreateRequestSectionArgs = [
    options: {
        isOptional: boolean;
        createDisplayType?: () => void;
        createDescription?: () => void;
        createBreakouts?: () => void;
    }
];
export type RendererCreateResponsesExamplesSectionArgs = [
    cb: (createTab: (options: {
        statusCode: string;
        contentType: string;
        showContentTypeInTab: boolean;
        createExample: () => void;
    }) => void) => void,
    options: {
        title: string;
    }
];
export type RendererCreateResponsesArgs = [
    cb: (createTab: (options: {
        statusCode: string;
        contentType: string;
        showContentTypeInTab: boolean;
        createDisplayType?: () => void;
        createDescription?: () => void;
        createBreakouts?: () => void;
    }) => void) => void,
    options?: {
        title?: string;
    }
];
export type RendererCreateSectionArgs = [cb: () => void];
export type RendererCreateSectionTitleArgs = [cb: () => void];
export type RendererCreateTabbedSectionArgs = [cb: () => void];
export type RendererCreateTabbedSectionTabArgs = [
    cb: () => void,
    options: {
        id: string;
    }
];
export type RendererCreateSectionContentArgs = [
    cb: () => void,
    options?: {
        id?: string;
    }
];
export type RendererCreateExpandableBreakoutArgs = [
    options: {
        rawTitle: string;
        isTopLevel: boolean;
        hasExpandableContent: boolean;
        createTitle: () => void;
        createDescription?: () => void;
        createExamples?: () => void;
        createDefaultValue?: () => void;
        createEmbed?: () => void;
        createProperties?: () => void;
    }
];
export type RendererCreateExpandablePropertyArgs = [
    options: {
        rawTitle: string;
        isTopLevel: boolean;
        hasExpandableContent: boolean;
        typeInfo?: DisplayTypeInfo;
        annotations: PropertyAnnotations[];
        createDescription?: () => void;
        createExamples?: () => void;
        createDefaultValue?: () => void;
        createEmbed?: () => void;
        createBreakouts?: () => void;
    }
];
export type RendererCreateFrontMatterDisplayTypeArgs = [
    options: {
        typeInfo: DisplayTypeInfo;
    }
];
export type RendererCreateDebugPlaceholderArgs = [
    options: {
        createTitle: () => void;
        createExample: () => void;
    }
];
export type RendererCreateEmbedArgs = [
    options: {
        slug: string;
        embedTitle: string;
        triggerText: string;
        createdEmbeddedContent: (renderer: Renderer) => void;
    }
];
type LowLevelBaseOptions = {
    append?: boolean;
};
export type RendererCreateHeadingArgs = [
    level: number,
    text: string,
    options?: LowLevelBaseOptions & EscapeOptions & {
        id?: string;
    }
];
export type RendererCreateTextArgs = [
    text: string,
    options?: LowLevelBaseOptions & EscapeOptions
];
export type RendererCreateCodeArgs = [
    text: string,
    options?: (LowLevelBaseOptions & EscapeOptions & {
        /**
         * The variant to use for the code block. If `raw`, the code will be
         * appended using a raw `<pre><code></code></pre>` block. Otherwise, the
         * code will be appended using a triple backtick block.
         */
        variant: "default";
        /**
         * The language to use for the code block. This is only used when the
         * variant is `default`.
         */
        language?: string;
        /**
         * The style to use for the code block. If the style is "block", then
         * the code will be rendered using <pre> + <code> tags for raw variants,
         * and triple backtick blocks for default variants. If the style is
         * "inline", then the code will be rendered using just a <code> tag for
         * raw variants, and a single backtick for default variants.
         */
        style?: "block" | "inline";
    }) | (LowLevelBaseOptions & EscapeOptions & {
        /**
         * The variant to use for the code block. If `raw`, the code will be
         * appended using a raw `<pre><code></code></pre>` block. Otherwise, the
         * code will be appended using a triple backtick block.
         */
        variant: "raw";
        /**
         * The language to use for the code block. This is only used when the
         * variant is `default`.
         */
        language?: never;
        /**
         * The style to use for the code block. If the style is "block", then
         * the code will be rendered using <pre> + <code> tags for raw variants,
         * and triple backtick blocks for default variants. If the style is
         * "inline", then the code will be rendered using just a <code> tag for
         * raw variants, and a single backtick for default variants.
         */
        style?: "block" | "inline";
    })
];
export type RendererCreateListArgs = [
    items: string[],
    options?: LowLevelBaseOptions & EscapeOptions
];
export type RendererCreatePillArgs = [
    variant: PillVariant,
    cb: () => string,
    options?: LowLevelBaseOptions
];
export type RendererCreateContextArgs = [context: Context];
export type RendererAlreadyInContextArgs = [id: string];
export type RendererHasParentContextTypeArgs = [type: ContextType];
export type RendererGetCurrentIdArgs = [postFixId?: string];
export declare abstract class Renderer {
    abstract render(): {
        contents: string;
        metadata?: PageMetadata;
    };
    abstract getPagePath(): string;
    abstract createEmbed(...args: RendererCreateEmbedArgs): void;
    abstract createTagSection(...args: RendererCreateTagSectionArgs): void;
    abstract createOperationSection(...args: RendererCreateOperationArgs): void;
    abstract createCodeSamplesSection(...args: RendererCreateCodeSamplesSectionArgs): void;
    abstract createSecuritySection(...args: RendererCreateSecuritySectionArgs): void;
    abstract createParametersSection(...args: RendererCreateParametersSectionArgs): void;
    abstract createRequestExamplesSection(...args: RendererCreateRequestExamplesSectionArgs): void;
    abstract createRequestSection(...args: RendererCreateRequestSectionArgs): void;
    abstract createResponsesExamplesSection(...args: RendererCreateResponsesExamplesSectionArgs): void;
    abstract createResponsesSection(...args: RendererCreateResponsesArgs): void;
    abstract createSection(...args: RendererCreateSectionArgs): void;
    abstract createSectionTitle(...args: RendererCreateSectionTitleArgs): void;
    abstract createSectionContent(...args: RendererCreateSectionContentArgs): void;
    abstract createExpandableBreakout(...args: RendererCreateExpandableBreakoutArgs): void;
    abstract createExpandableProperty(...args: RendererCreateExpandablePropertyArgs): void;
    abstract createFrontMatterDisplayType(...args: RendererCreateFrontMatterDisplayTypeArgs): void;
    abstract createDebugPlaceholder(...args: RendererCreateDebugPlaceholderArgs): void;
    abstract createHeading(...args: RendererCreateHeadingArgs): string;
    abstract createText(...args: RendererCreateTextArgs): string;
    abstract createCode(...args: RendererCreateCodeArgs): string;
    abstract createList(...args: RendererCreateListArgs): string;
    abstract createPill(...args: RendererCreatePillArgs): string;
    abstract getDocsData(): Map<string, Chunk>;
    abstract enterContext(...args: RendererCreateContextArgs): void;
    abstract exitContext(): void;
    abstract getCurrentContextType(): ContextType;
    abstract getSchemaDepth(): number;
    abstract alreadyInContext(...args: RendererAlreadyInContextArgs): boolean;
    abstract hasParentContextType(...args: RendererHasParentContextTypeArgs): boolean;
    abstract getCurrentId(...args: RendererGetCurrentIdArgs): string;
}
export {};
//# sourceMappingURL=base.d.ts.map