import React from 'react';
import { CellRichTextInput } from '@wix/patterns-fields';
import { RichTextView } from './View';
export const RichTextEdit = ({ value, onChange, onCommit, editTrigger, typeConfig, columnId, rowKey, }) => {
    const initialTypedKey = editTrigger &&
        typeof editTrigger === 'object' &&
        editTrigger.kind === 'type'
        ? editTrigger.key
        : undefined;
    const { textStyle } = typeConfig ?? {};
    return (React.createElement(React.Fragment, null,
        React.createElement(RichTextView, { value: value, columnId: columnId, rowKey: rowKey }),
        React.createElement(CellRichTextInput, { value: value, onChange: onChange, initialTypedKey: initialTypedKey, onCommit: onCommit, textStyle: textStyle })));
};
//# sourceMappingURL=Edit.js.map