import { ChartColumn } from '../types/chart';

/**
 * Apply workbook styling to AI-generated Vega specs in chat
 * This ensures consistency between chat charts and workbook charts
 */
export declare function applyChatVegaStyling(spec: any, originalSpec: any): void;
export interface DrillDownContext {
    /** The column/member that was clicked */
    memberName: string;
    /** The data value that was clicked (optional) */
    value?: any;
    /** Row data context (for table cells) */
    rowData?: any;
    /** Chart data context (for chart clicks) */
    chartData?: any;
    /** Optional KPI block identifier for block-level drilldowns */
    blockId?: string;
}
export interface DrillDownHandler {
    onDrillDown: (context: DrillDownContext) => void;
}
export declare const mapFieldsToColumns: (vegaSpec: any, columns: ChartColumn[]) => any;
/**
 * Create a mapping function to find the original field name from potentially aggregated names
 */
export declare const findOriginalFieldName: (datumKey: string, measureFields: ChartColumn[]) => ChartColumn | undefined;
/**
 * Find the original field name using Vega-Lite encoding information
 * This is more precise than heuristic matching as it uses the actual field mappings from the chart spec
 * Focuses on x and y encodings which contain the primary measure data for drill-down
 */
export declare const findOriginalFieldNameFromEncoding: (datumKey: string, vegaEncoding: any, measureFields: ChartColumn[]) => ChartColumn | undefined;
/**
 * Format raw data array into objects with proper typing based on schema
 */
export declare const formatChartData: (data: any[], schema: ChartColumn[]) => Record<string, any>[];
/**
 * Create a Vega chart click handler for drill down functionality
 */
export declare const createVegaDrillDownHandler: (onDrillDown: DrillDownHandler['onDrillDown'], schema: ChartColumn[], vegaSpec?: any) => (view: any) => void;
//# sourceMappingURL=vega-chart-utils.d.ts.map