import type { ActionDefinition } from './types'; export type ActionPlacement = 'row' | 'table' | 'create'; export interface ModelActionToolbarProps { /** Model key as registered on the backend (e.g. "JournalEntry"). */ model: string; /** Data endpoint passed to the dispatcher. Defaults to `/data//me`. */ endpoint?: string; /** * Pre-fetched action definitions. When omitted the toolbar reads them from * the metadata cache, falling back to `/metadata/table/`. Pass this * when the host page already holds the metadata to avoid a second fetch. */ actions?: ActionDefinition[]; /** Which placements to render. Defaults to `['table', 'create']`. */ placements?: ActionPlacement[]; /** Fired after an action's modal reports success. */ onChange?: () => void; /** Extra classes on the button row container. */ className?: string; /** * Fired on hover/focus of an action button so the host can prefetch a * federated remote (e.g. collections) before the click — Module Federation * lazy load without blocking first paint of the list page. */ onActionIntent?: (action: ActionDefinition) => void; } /** * Last-resort label when `t(key)` has no translation yet: never flash the full * dotted key in a primary CTA. Prefers the action/field segment over a trailing * `.label` / `.confirm` leaf. * "receivables.action.collect_payment_create" → "Collect payment create" * "integration_github.action.create_issue.label" → "Create issue" * Already-human labels pass through unchanged. */ export declare function humanizeActionLabel(label: string): string; /** * Returns the model's actions matching the requested placements. Reads from the * `actions` prop when provided, else the metadata cache, else fetches once. */ export declare function useModelActions(model: string, placements?: ActionPlacement[], provided?: ActionDefinition[]): ActionDefinition[]; export declare function ModelActionToolbar({ model, endpoint, actions, placements, onChange, className, onActionIntent, }: ModelActionToolbarProps): import("react").JSX.Element | null; //# sourceMappingURL=model-action-toolbar.d.ts.map