// #region Imports
import { RichTextCommand } from './Abstracts/RichTextCommand';
// #endregion
/**
 * MonospaceCommand class to handle monospace formatting in a textarea.
 *
 * @public
 */
export class MonospaceCommand extends RichTextCommand {
    // #region Ctor
    /**
     * Constructs a new instance of the `BoldCommand` class.
     *
     * @public
     */
    constructor() {
        super();
    }
    // #endregion
    // #region Methods
    /**
     * Toggles monospace formatting on the selected text within the contenteditable div.
     *
     * @public
     * @returns {boolean} - True if the operation was successful, otherwise false.
     */
    execute() {
        if (!this.contentEditable) {
            console.error('MonospaceCommand is not attached to any contenteditable element.');
            return false;
        }
        return this.toggleFormatting('code', '`');
    }
}
//# sourceMappingURL=MonospaceCommand.js.map