import { AiCfoChartType, ChartVisualization } from '@zeniai/client-epic-state';
/**
 * Recharts renders X-axis category labels as HTML inside `<foreignObject>`.
 * Loading that SVG into `Image` and drawing to canvas often fails (security /
 * rasterization), so PNG download never completes. Replace with native SVG
 * `<text>` on an export-only clone.
 */
/**
 * Nested `<svg>` inside a composite export SVG often rasterizes with wrong
 * intrinsic sizing (overlapped x-axis labels). Standalone chart SVG for `Image`
 * avoids that; call before serializing the chart clone alone.
 */
export declare function prepareStandaloneChartSvgForRasterExport(svg: SVGElement): void;
export declare function getSvgViewBoxSize(svg: SVGElement): {
    height: number;
    width: number;
} | null;
export declare function replaceForeignObjectsWithSvgTextForExport(svgRoot: SVGElement, heroColor: string): void;
export declare const LEGEND_CONFIG: {
    ICON_SIZE: number;
    ICON_TEXT_GAP: number;
    ITEM_GAP: number;
    TEXT_CHAR_WIDTH: number;
    ICON_Y_OFFSET: number;
    TEXT_Y_OFFSET: number;
    ICON_RADIUS: number;
    HEIGHT: number;
    HORIZONTAL_PADDING: number;
    VERTICAL_OFFSET: number;
    ROW_CENTERING_DIVISOR: number;
    ITEM_NUMBERING_OFFSET: number;
};
/**
 * Helper function to create SVG element with attributes
 */
export declare const createSVGElement: (tagName: string, attributes: Record<string, string | number>) => SVGElement;
/**
 * Helper function to calculate the width of a single legend item
 */
export declare const calculateLegendItemWidth: (item: {
    color: string;
    value: string;
}, config: typeof LEGEND_CONFIG) => number;
/**
 * Helper function to group legend items into rows based on available width
 */
export declare const groupLegendItemsIntoRows: (legendData: Array<{
    color: string;
    value: string;
}>, availableWidth: number, config: typeof LEGEND_CONFIG) => Array<Array<{
    color: string;
    value: string;
}>>;
/**
 * Helper function to calculate total legend height
 * Uses groupLegendItemsIntoRows to avoid code duplication
 */
export declare const calculateLegendHeight: (legendData: Array<{
    color: string;
    value: string;
}>, chartWidth: number, config: typeof LEGEND_CONFIG) => number;
/**
 * Helper function to render a single legend row
 */
export declare const renderLegendRow: (svg: SVGElement, row: Array<{
    color: string;
    value: string;
}>, rowY: number, totalWidth: number, config: typeof LEGEND_CONFIG, themeContext: {
    colors: {
        hero: string;
    };
}) => void;
/**
 * Helper function to create legend data based on chart type
 */
export declare const createLegendData: (chartType: AiCfoChartType, data: ChartVisualization, xKey: string, yKeys: string[], lineKeys: string[], defaultColors: string[]) => Array<{
    color: string;
    value: string;
}>;
/**
 * Helper function to add legend to SVG with multi-line support
 */
export declare const addLegendToSVG: (svg: SVGElement, chartHeight: number, totalWidth: number, legendData: Array<{
    color: string;
    value: string;
}>, themeContext: {
    colors: {
        hero: string;
    };
}) => void;
