import type { TableMetadata } from './types'; export interface UseDynamicRowActionsParams { /** Model key as registered on the backend (e.g. "issue"). */ model: string; /** * Data endpoint base. The per-record DELETE hits `/`; when * omitted it falls back to `/data//`. Pass the SAME base the * caller lists from (e.g. `/data//me`) so writes stay org-scoped. */ endpoint?: string; /** * Endpoint base for WRITES when it differs from the list endpoint. Some * hosts list from a role-scoped path (`/dynamic//me`) that does NOT * accept `DELETE /` — pass the mutable base here (e.g. * `/dynamic/`). Falls back to `endpoint`. */ mutationEndpoint?: string; /** Raw model metadata — used to resolve link/custom action definitions. */ metadata: TableMetadata | null; /** * Host hook for `view`/`edit` (and any unhandled key). STRING contract: * receives the action key, not the action object. When absent, `view`/`edit` * fall back to the built-in record dialog. */ onAction?: (action: string, row: any) => void; /** Called after a successful delete / custom action to refetch the list. */ onRefresh: () => void; } export interface DynamicRowActions { /** Dispatch a row action by its STRING key. */ handleInternalAction: (action: string, row: any) => Promise; /** * The delete-confirm dialog + record dialog + action modal this handler * drives. Render it ONCE in the consuming component's tree. */ dialogs: React.ReactElement; } /** * Owns the state + dialogs + dispatch logic for per-row actions, shared by * DynamicTable and DynamicKanban so both behave identically. */ export declare function useDynamicRowActions({ model, endpoint, mutationEndpoint, metadata, onAction, onRefresh, }: UseDynamicRowActionsParams): DynamicRowActions; //# sourceMappingURL=dynamic-row-actions.d.ts.map