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