import { Button, Dropdown } from '@heroui/react'; import { ComponentProps, ReactNode } from 'react'; import { AthenaTableActionFeedbackConfig } from '../utils/table-action-feedback.js'; export type AthenaTableActionTone = "default" | "danger" | "success" | "warning"; export interface AthenaTableActionContext { selectedCount: number; selectedKeys: readonly string[]; selectedRows: readonly Row[]; tableLabel: string; } export type AthenaTableActionBooleanResolver = boolean | ((context: AthenaTableActionContext) => boolean); export interface AthenaTableAction { buttonVariant?: ComponentProps["variant"]; fallbackDescription?: string; /** * Optional toast feedback for bulk / selection actions. * When set, `invokeAthenaTableAction` wraps the handler and toasts success/error. */ feedback?: AthenaTableActionFeedbackConfig; icon?: ReactNode; id: string; isDisabled?: AthenaTableActionBooleanResolver; isVisible?: AthenaTableActionBooleanResolver; label: ReactNode; maxSelectedCount?: number; menuItemVariant?: ComponentProps["variant"]; minSelectedCount?: number; onAction?: (context: AthenaTableActionContext) => void | Promise; onBulkAction?: (selectedRows: readonly Row[], context: AthenaTableActionContext) => void | Promise; onSingleAction?: (selectedRow: Row, context: AthenaTableActionContext) => void | Promise; tone?: AthenaTableActionTone; } export declare function resolveAthenaTableActionBoolean(value: AthenaTableActionBooleanResolver | undefined, context: AthenaTableActionContext, fallback: boolean): boolean; export declare function canRunAthenaTableAction(action: AthenaTableAction, context: AthenaTableActionContext): boolean; export declare function isAthenaTableActionDisabled(action: AthenaTableAction, context: AthenaTableActionContext): boolean; export declare function invokeAthenaTableAction(action: AthenaTableAction, context: AthenaTableActionContext): void;