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