import type { Datum } from "../charts/shared/datumTypes";
import type { LegendLayout } from "../types/legendTypes";
/**
 * Server-side rendering of Semiotic charts to standalone SVG strings.
 *
 * Uses the shared SceneToSVG converters (same code used by Stream Frames
 * for SSR) plus PipelineStore / OrdinalPipelineStore / NetworkPipelineStore
 * for scene graph computation.
 *
 * Features:
 * - Theme inlining (resolve presets to concrete SVG styles)
 * - Legend rendering (categorical color swatches)
 * - Accessibility (title, desc, role="img")
 * - Grid lines
 * - Annotations (y-threshold, x-threshold, band, label, text, category-highlight)
 * - renderChart HOC-level API
 */
import * as React from "react";
import type { StreamXYFrameProps } from "../stream/types";
import type { StreamNetworkFrameProps } from "../stream/networkTypes";
import type { StreamOrdinalFrameProps } from "../stream/ordinalTypes";
import type { StreamGeoFrameProps } from "../stream/geoTypes";
import { type RenderEvidence } from "./renderEvidence";
import { type ThemeInput } from "./themeResolver";
import { CHART_CONFIGS } from "./serverChartConfigs";
type FrameType = "xy" | "ordinal" | "network" | "geo";
type StaticFrameProps = (StreamXYFrameProps | StreamNetworkFrameProps | StreamOrdinalFrameProps | StreamGeoFrameProps) & ThemeAwareProps;
interface ThemeAwareProps {
    theme?: ThemeInput;
    showLegend?: boolean;
    showGrid?: boolean;
    annotations?: Datum[];
    title?: string | React.ReactNode;
    description?: string;
    background?: string;
    className?: string;
    legendPosition?: "right" | "left" | "top" | "bottom";
    legendLayout?: LegendLayout;
    /** Prefix for SVG element IDs — used by renderDashboard to avoid collisions */
    _idPrefix?: string;
}
export declare function renderToStaticSVG(frameType: FrameType, props: StaticFrameProps): string;
export declare function renderXYToStaticSVG(props: StreamXYFrameProps & ThemeAwareProps): string;
export declare function renderOrdinalToStaticSVG(props: StreamOrdinalFrameProps & ThemeAwareProps): string;
export declare function renderNetworkToStaticSVG(props: StreamNetworkFrameProps & ThemeAwareProps): string;
export declare function renderGeoToStaticSVG(props: StreamGeoFrameProps & ThemeAwareProps): string;
/**
 * Chart component names renderable via `renderChart()`. Derived from the
 * registry so adding a chart to `CHART_CONFIGS` automatically widens this
 * union — no second edit required, no silent drift like the CandlestickChart
 * gap that motivated this refactor.
 */
type ChartName = keyof typeof CHART_CONFIGS;
interface RenderChartOptions {
    /** Output format — currently only "svg" is synchronous */
    format?: "svg";
}
/**
 * Render a chart using HOC-level props (categoryAccessor, valueAccessor, etc.)
 * instead of frame-level props (oAccessor, rAccessor, etc.).
 *
 * This is the primary API for AI/MCP workflows.
 */
export declare function renderChart(component: ChartName, props: Datum, options?: RenderChartOptions): string;
/**
 * Render a chart and return machine-readable evidence about what actually
 * rendered — mark counts by scene type, resolved axis domains, emptiness,
 * legend/annotation counts, and the accessible name. The evidence is computed
 * from the same scene graph the SVG converter walks, so it is ground truth a
 * non-visual caller (an agent repair loop, a CI assertion) can quote without
 * pixel inspection. Exposed through the MCP `renderChart` tool response.
 */
export declare function renderChartWithEvidence(component: ChartName, props: Datum, options?: RenderChartOptions): {
    svg: string;
    evidence: RenderEvidence;
};
export interface RenderToImageOptions {
    /** Output format */
    format?: "png" | "jpeg";
    /** Scale factor (e.g., 2 for retina) */
    scale?: number;
    /** Background color (overrides theme) */
    background?: string;
}
/**
 * Render a chart to a PNG or JPEG Buffer.
 *
 * Requires `sharp` as an optional peer dependency.
 * Falls back to a descriptive error if sharp is not installed.
 */
export declare function renderToImage(frameTypeOrComponent: FrameType | ChartName, props: Datum, options?: RenderToImageOptions): Promise<Buffer>;
export interface DashboardChart {
    /** Frame type or HOC component name */
    component?: ChartName;
    frameType?: FrameType;
    /** Chart props (data, accessors, etc.) */
    props: Datum;
    /** Span multiple columns (for emphasis="primary") */
    colSpan?: number;
}
export interface DashboardLayout {
    /** Number of columns */
    columns?: number;
    /** Gap between charts in pixels */
    gap?: number;
}
export interface RenderDashboardOptions {
    title?: string;
    subtitle?: string;
    theme?: ThemeInput;
    width?: number;
    height?: number;
    layout?: DashboardLayout;
    background?: string;
    /** Output format */
    format?: "svg";
}
/**
 * Compose multiple charts into a single SVG.
 */
export declare function renderDashboard(charts: DashboardChart[], options?: RenderDashboardOptions): string;
export {};
