import { jsx as _jsx } from "react/jsx-runtime";
import { useEffect, useRef } from 'react';
export const WysiwygEditorComponent = function WysiwygEditorComponent({ className, autofocus, editor, children, qa }) {
    const ref = useRef(null);
    useEffect(() => {
        const { current } = ref;
        if (current) {
            current.appendChild(editor.wysiwygEditor.dom);
            if (autofocus) {
                editor.focus();
            }
        }
    }, [editor]);
    return (_jsx("div", { "data-qa": qa, ref: ref, className: className, children: children }));
};
//# sourceMappingURL=WysiwygEditorComponent.js.map
