import React, { useImperativeHandle, forwardRef, useRef } from 'react';
import Thumbnail from "./Thumbnail";

// 测试使用
// import { Bridge, Device } from 'seedsui-react'

// 照片视频预览
var Edit = /*#__PURE__*/forwardRef(function (_ref, ref) {
  var value = _ref.value,
    onDelete = _ref.onDelete,
    onPreview = _ref.onPreview;
  var comboRef = useRef(null);
  useImperativeHandle(ref, function () {
    return {
      comboDOM: comboRef === null || comboRef === void 0 ? void 0 : comboRef.current,
      getComboDOM: function getComboDOM() {
        return comboRef === null || comboRef === void 0 ? void 0 : comboRef.current;
      }
    };
  });
  return /*#__PURE__*/React.createElement("div", {
    className: "signature-edit-container",
    ref: comboRef
  }, /*#__PURE__*/React.createElement(Thumbnail, {
    src: value,
    onPreview: onPreview
  }), typeof onDelete === 'function' && /*#__PURE__*/React.createElement("div", {
    className: "signature-edit-image-delete",
    onClick: function onClick(e) {
      e.stopPropagation();
      onDelete('');
    }
  }, /*#__PURE__*/React.createElement("div", {
    className: "signature-edit-image-delete-icon"
  })));
});
export default Edit;