"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.RichTextEdit = void 0;
var _react = _interopRequireDefault(require("react"));
var _patternsFields = require("@wix/patterns-fields");
var _View = require("./View");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/EditableTable/cellTypes/richText/Edit.tsx";
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 /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_View.RichTextView, {
    value: value,
    columnId: columnId,
    rowKey: rowKey,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 7
    }
  }), /*#__PURE__*/_react.default.createElement(_patternsFields.CellRichTextInput, {
    value: value,
    onChange: onChange,
    initialTypedKey: initialTypedKey,
    onCommit: onCommit,
    textStyle: textStyle,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 32,
      columnNumber: 7
    }
  }));
};
exports.RichTextEdit = RichTextEdit;
//# sourceMappingURL=Edit.js.map