import { UmbTiptapToolbarElementApiBase } from '../tiptap-toolbar-element-api-base.js';
export default class UmbTiptapToolbarFontSizeExtensionApi extends UmbTiptapToolbarElementApiBase {
    isActive(editor, item) {
        const styles = editor?.getAttributes('span')?.style;
        return styles?.includes(`font-size: ${item?.data};`) === true;
    }
    execute(editor, item) {
        if (!item?.data)
            return;
        editor?.chain().focus().toggleSpanStyle(`font-size: ${item.data};`).run();
    }
}
