import type { AltEditorLiteLanguage } from '../core/alt-editor-lite-language.js'; import type { EditorCapabilities } from '../core/editor-capabilities.js'; import type { EditorInstanceLookup } from '../instance/editor-instance-store.js'; import type { DataTablesStatic } from 'datatables.net'; /** Stable DataTables Buttons names registered by AltEditorLite. */ export type EditorButtonName = 'altEditorLiteCreate' | 'altEditorLiteEdit' | 'altEditorLiteRemove' | 'altEditorLiteRefresh'; /** * Enablement and accessible explanation for all optional editor buttons. */ export interface EditorButtonState { readonly unavailableTitle: string; readonly create: { readonly enabled: boolean; readonly visible: boolean; readonly text: string; readonly title: string; }; readonly edit: { readonly enabled: boolean; readonly visible: boolean; readonly text: string; readonly title: string; }; readonly remove: { readonly enabled: boolean; readonly visible: boolean; readonly text: string; readonly title: string; }; readonly refresh: { readonly enabled: boolean; readonly visible: boolean; readonly text: string; readonly title: string; }; } /** * Inputs used to derive optional Buttons state without retaining an editor. */ export interface EditorButtonStateInput { /** Features available for the configured edit presentation. */ readonly capabilities: Readonly; /** Whether Create has a configured persistence owner. */ readonly hasCreate: boolean; /** Whether Select extended the table API. */ readonly hasSelect: boolean; /** Whether the editor accepts a new operation. */ readonly isReady: boolean; /** Number of currently selected rows when Select is available. */ readonly selectedRowCount: number; /** Resolved language for the owning editor instance. */ readonly language: Readonly; } /** * Derives enablement and accessible titles for all editor buttons. * * @param input - Current editor capabilities, state, and selection count. * @returns Complete readonly button state. */ export declare function createEditorButtonState(input: Readonly): EditorButtonState; /** * Registers optional Buttons definitions when Buttons has extended DataTables. * * The definitions resolve the current editor from the table element on every * action and update, so they never retain a destroyed or cross-bundle instance. * * @param dataTable - DataTables static runtime. * @param instanceLookups - Live cross-bundle instance lookup set. * @param registeredButtonNames - Shared idempotency record. */ export declare function registerEditorButtons(dataTable: DataTablesStatic, instanceLookups: ReadonlySet, registeredButtonNames: Set): void;