/**
 * 操作列插件 —— 内部类型
 *
 * 对外共享的 OperateColumnHandlers / OperateColumnConfig 统一定义在
 * pipeline/types.ts 中，此文件仅定义插件内部使用的类型。
 */
import * as React from 'react';
export type { OperateColumnConfig, OperateColumnHandlers } from '../../pipeline/types';
/** 通用对象类型 */
export type ExpendObj = Record<string, any>;
/** 按钮对象配置 */
export interface IButtonObj {
    children: string | React.ReactNode | ((row: ExpendObj, index: number) => React.ReactNode);
    type?: 'primary' | 'secondary' | 'normal';
    onClick?: (event: React.MouseEvent, row: ExpendObj, index: number) => void;
    visible?: (row: ExpendObj, index: number) => boolean;
    isDisabled?: (row: ExpendObj, index: number) => boolean;
    btnProps?: ExpendObj;
    widthRule?: {
        text: string | ((row: ExpendObj, index: number) => string);
        additionWidth: number | ((row: ExpendObj, index: number) => number);
    };
}
/** 按钮渲染函数类型 */
export type IButtonRender = (row: ExpendObj, index: number) => React.ReactNode;
/** 操作列插件配置（内部使用，比 pipeline/types 中的 IOperateColumnOptions 多出 columnsProps 等） */
export interface IOperateColumnPluginOptions {
    width?: number;
    buttons?: Array<IButtonObj | IButtonRender>;
    showButtonNum?: number;
    render?: (val: any, record: ExpendObj, index: number) => React.ReactNode;
    columnsProps?: () => ExpendObj;
    split?: React.ReactNode;
    splitWidth?: number;
    contentWidthRule?: ExpendObj;
    moreBtnProps?: ExpendObj;
    lock?: boolean | 'left' | 'right';
}
