import * as React from 'react';
import { domStyleMap } from '../../cn-utils';
import { ICnTableColumn } from './column';
export interface Obj {
    [key: string]: unknown;
}
/**
 * 格式配置接口
 * 定义单元格格式化的配置项
 */
export interface FormatConfig {
    /** 单元格渲染函数 */
    cell?: (value: any, index: number, record: any) => React.ReactNode;
    /** 渲染函数（同 cell，兼容用） */
    render?: (value: any, index: number, record: any) => React.ReactNode;
    /** 对齐方式 */
    align?: 'left' | 'center' | 'right';
    /** 列宽 */
    width?: number | string;
    /** 其他扩展属性 */
    [key: string]: any;
}
/**
 * 格式工厂函数类型
 * 接收列定义，返回格式配置
 */
export type FormatFactory = (column: ICnTableColumn) => FormatConfig;
/**
 * 格式映射表类型
 */
export interface FormatMap {
    [key: string]: FormatConfig | FormatFactory;
}
/** @deprecated 使用 FormatMap 代替 */
export interface formatMap {
    [key: string]: ICnTableColumn;
}
export type Fn = (...args: unknown[]) => unknown;
export type ServiceQuery = [
    {
        params: {
            key?: string;
        } & Record<string, any>;
    }
];
export type ServiceResult = string;
export interface CnTableCellFormatProps<State> {
    color: string;
    value: string | number;
    state?: State;
    amount?: string;
    currency?: string;
    [key: string]: any;
}
type domStyleType = typeof domStyleMap;
export interface CnTableCellFormatBalloon extends domStyleType {
    text?: string;
    value?: string;
    link?: string;
    toolTips?: Array<Record<string, string>> | string;
}
export type ICnTableCellItem = CnTableCellFormatBalloon | string;
export {};
