import type { Editables } from './editable-content.js';
import type { RefinedNode } from './node-refined-types.js';
/**
 *
 * Represents any Editor command.
 *
 *  Example:
 *  ```ts
 *  const command: CommandDescriptor<Divider_Style> = {
 *    name: appendDividersToImages,
 *    execute: (style: Divider_Style) => (model: RicosContent) =>
 *       model
 *         .filter(byType(Node_Type.IMAGE))
 *         .modify(n => [n, Divider.create(style)]);
 *  }
 *  ```
 *
 * @template Args usually RichContent-related data item handled by this Command
 */
export interface CommandDescriptor<Args = never> {
    /**
     * The command name
     *
     * @type {string}
     * @memberof CommandDescriptor
     */
    name: string;
    /**
     * Describes the command logic over provided content model, while optionally utilizing predefined commands
     *
     * @param {Editables<RefinedNode>} model
     * @param { [key: CommandDescriptor['name']]: Command } commands
     * @returns  {Editables<RefinedNode>}
     * @memberof CommandDescriptor
     */
    execute({ model, commands }: {
        model: Editables<RefinedNode>;
        commands: CommandDescriptors;
    }): (args: Args) => Editables<RefinedNode>;
}
declare class CommandDescriptors {
    static of(descriptors: CommandDescriptor[]): CommandDescriptors;
}
export {};
//# sourceMappingURL=commands.d.ts.map