import { UmbTiptapToolbarElementApiBase } from '../tiptap-toolbar-element-api-base.js';
export default class UmbTiptapToolbarTextAlignLeftExtensionApi extends UmbTiptapToolbarElementApiBase {
    isActive(editor) {
        return editor?.isActive({ textAlign: 'left' }) === true;
    }
    execute(editor) {
        if (!this.isActive(editor)) {
            editor?.chain().focus().setTextAlign('left').run();
        }
        else {
            editor?.chain().focus().unsetTextAlign().run();
        }
    }
}
