import { type ReactNode } from 'react'; import type { ReportBI, Translate, TranslationsKeys } from '@wix/bex-core'; import type { HeaderAction, FieldActionsMenuConfig } from './headerActionTypes'; export type FieldActionKey = 'editField' | 'makePrimary' | 'hideColumn' | 'duplicateField' | 'duplicateFieldWithContent' | 'sortAscending' | 'sortDescending' | 'filter' | 'archive' | 'delete'; interface FieldActionDef { /** Fallback (English) label, used when no `labelKey` is set or no translate fn is passed. */ label: string; /** Translation key; when set and a translate fn is passed to buildFieldActionGroups, used instead of `label`. */ labelKey?: TranslationsKeys; /** Shared data-hook for the rendered menu item — the same for every source and surface. */ dataHook: string; /** BI name reported via `cairoCtaClicked`; set only on the field-management actions that report. */ ctaName?: string; icon: ReactNode; skin?: 'destructive'; } export declare const FIELD_ACTIONS: Record; export type FieldActionHandlers = Partial void>>; export interface FieldActionHandlersConfig { handlers: FieldActionHandlers; loading?: Partial>; /** Per-action disabled state, owned by the source: a key present here renders * that action disabled with the given tooltip. */ disabledTooltips?: Partial>; /** Menu-level disabled reason: when set and there are no actions, the menu * renders a disabled trigger with this tooltip (e.g. a read-only source). */ disabledTooltip?: string; } export interface FieldActionsBIContext { reportBi: ReportBI; location: string; listSize: number; } export declare function buildFieldActionGroups(args: { columnId: string; handlers: FieldActionHandlers; loading?: Partial>; /** Per-action disabled tooltips owned by the source (key present ⇒ disabled). */ disabledTooltips?: Partial>; groups: FieldActionKey[][]; /** When provided, labels use the registry's `labelKey` (falling back to `label`). */ translate?: Translate; /** When provided, actions with a registry `ctaName` report `cairoCtaClicked` on click. */ bi?: FieldActionsBIContext; }): HeaderAction[][]; export declare function buildFieldActionsMenu(args: { fieldId: string; config: FieldActionHandlersConfig | null; groups: FieldActionKey[][]; translate: Translate; tooltipContent?: string; bi?: FieldActionsBIContext; }): FieldActionsMenuConfig | null; export {}; //# sourceMappingURL=FieldActions.d.ts.map