/// <reference types="react" />
import { Component } from '../Component/types';
import { QueryAttributes } from '../QueryAttributes/types';
import * as Field from '../Field';
import { Result } from '../Result/types';
import { SupportedAggregates } from '../Aggregate/types';
import { TableContent, TableFields, TableFieldsV2 } from '../DataTable/types';
import * as Drilldown from '../Drilldown/Drilldown';
import { DataSet } from '../DataSet/types';
export declare type BuildViewClick = {
    onViewClick: (data: Component.ChartOnViewClick, query: Component.OnViewClickQuery) => void;
    dimension: QueryAttributes.Dimension[] | undefined;
    measure: QueryAttributes.Measure[] | undefined;
    viewId: string;
    type: 'barChart' | 'horizontalBarChart';
    timeDimension: QueryAttributes.TimeDimension | null;
    dataSet: DataSet;
};
export declare type runViewClickQueryType = (queries: Partial<QueryAttributes>, existingField: Drilldown.DrilldownField[]) => Promise<any | null>;
export declare function buildOnViewClick(clickedValue: Datum | undefined, nearestDatum: DatumByKey | undefined, params: BuildViewClick, runViewClickQuery: runViewClickQueryType): void;
export declare type BuildTableViewClick = {
    viewId: string;
    supportedAggregates: SupportedAggregates;
    result: Result | null | undefined;
    onViewClick: ((data: Component.TableOnViewClick) => void) | undefined;
    type: 'dataTable' | 'basicTable';
    dimension: QueryAttributes.Dimension[];
    dataSet: DataSet;
};
export declare type TableOnViewClick = (rowIndex: number, cellIndex: number, value: string | number, fieldV2?: TableFieldsV2[], additionalAttributes?: AddtionalOnClickAttributes) => void;
export declare type TableCellRender = (rowIndex: number, cellIndex: number, value: string | number, fieldV2?: TableFieldsV2[], additionalAttributes?: AddtionalOnClickAttributes) => React.ReactNode | string;
export declare type AddtionalOnClickAttributes = {
    grouping?: Component.ReturnedField[];
    value?: Component.ReturnedField;
};
export declare function buildTableOnViewClick(params: BuildTableViewClick, cellIndex: number, rowIndex: number, value: string | number, fieldsV2?: TableFieldsV2[], additionalAttributes?: AddtionalOnClickAttributes): void;
export declare function buildFieldsV2(fields: TableFields[], functionsToCheck: Field.DecodingFunctionsToCheck, row: TableContent[], subsetFields?: TableFields[], drilldown?: Component.TableDrilldown): TableFieldsV2[];
export declare const transformToObject: (dataObjects: Result.Field[], valuesArray: number[]) => {
    [key: string]: number;
};
export declare const hasProtectedFields: (protectedFields?: Component.ProtectedFields | undefined) => boolean;
export declare type Datum = {
    [key: string]: any;
};
export declare type DatumByKey = Record<Datum['key'], Datum>;
export declare type BuildTableCellRender = {
    viewId: string;
    supportedAggregates: SupportedAggregates;
    result: Result | null | undefined;
    renderTableCell: ((data: Component.RenderTableCell) => void) | undefined;
    type: 'dataTable' | 'basicTable';
    dimension: QueryAttributes.Dimension[];
    protectedFields?: Component.ProtectedFields;
};
export declare const buildTableCell: (props: BuildTableCellRender, cellIndex: number, rowIndex: number, value: string | number, fields?: TableFieldsV2[] | undefined, additionalAttributes?: AddtionalOnClickAttributes | undefined) => React.ReactNode | string;
export declare function getCellAttributes(result: Result, rowIndex: number, cellIndex: number, type: string, value: string | number, dimension: QueryAttributes.Dimension[], additionalAttributes: AddtionalOnClickAttributes | undefined, supportedAggregates: SupportedAggregates): {
    activeFieldsWithValues: {
        [key: string]: number;
    };
    cell: {
        grouping: Component.ReturnedField[];
        value: Component.ReturnedField;
        fieldId?: undefined;
        function?: undefined;
        aggregate?: undefined;
    } | {
        fieldId: string;
        value: import("react").ReactText;
        function: string;
        aggregate: string;
        grouping?: undefined;
    };
};
