// #region Imports
import { RichTextCommand } from './Abstracts/RichTextCommand';
// #endregion
/**
 * BoldCommand class to handle bold formatting in a textarea.
 */
export class BoldCommand extends RichTextCommand {
    // #region Ctor
    /**
     * Constructs a new instance of the `BoldCommand` class.
     *
     * @public
     */
    constructor() {
        super();
    }
    // #endregion
    // #region Methods
    /**
     * Toggles bold 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('BoldCommand is not attached to any contenteditable element.');
            return false;
        }
        return this.toggleFormatting('strong', '*');
    }
}
//# sourceMappingURL=BoldCommand.js.map