import type * as React from 'react'; import type { Row } from '@tanstack/react-table'; export interface TableAction { text: React.ReactNode; handler: (item: TValue, index: number, event: React.MouseEvent) => void; href?: ((item: TValue, index: number) => string) | string; target?: string; rel?: string; disabled?: boolean; theme?: 'normal' | 'danger'; icon?: React.ReactNode; } export interface TableActionGroup { title: string; items: TableActionConfig[]; } export type TableActionConfig = TableAction | TableActionGroup; /** * common sizes for Menu and Button */ export type TableRowActionsSize = 's' | 'm' | 'l' | 'xl'; export type RenderRowActionsProps = { item: TValue; index: number; }; export interface TableActionsSettings { getRowActions?: (item: TValue, index: number) => TableActionConfig[]; renderRowActions?: (props: { row: Row; }) => React.ReactNode; rowActionsSize?: TableRowActionsSize; }