import React__default, { useContext } from 'react';
import Modal from '../../ui/Modal.js';
import { ButtonTypes } from '../../ui/Button.js';
import { a as LocalizationContext } from '../../LocalizationContext-5920dafc.js';
import { u as useChannelContext } from '../../ChannelProvider-8be62d5d.js';
import 'react-dom';
import '../../index-d2dd3ae2.js';
import '../../ui/Icon.js';
import 'prop-types';
import '../../ui/IconButton.js';
import '../../tslib.es6-279bc71d.js';
import '../../index-4a23e6ff.js';
import '../../stringSet-f0e25f08.js';
import '../../MediaQueryContext-9c1bb79f.js';
import '../../index-b5b56cb7.js';
import '../../UserProfileContext-749db4f6.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../_rollupPluginBabelHelpers-636e674b.js';
import '../../index-4f51d577.js';
import '../../topics-d2e15fe6.js';
import '../../index-1a59aaa9.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../compareIds-5494c074.js';
import '../../const-8bb8cc10.js';
import '@sendbird/chat/groupChannel';
import '../../uuid-636df95b.js';
import '@sendbird/chat/message';
import '../../ui/ContextMenu.js';
import '../../ui/SortByRow.js';
import '../../ui/ReactionButton.js';
import '../../ui/ImageRenderer.js';

var RemoveMessage = function (props) {
  var _a;

  var onCancel = props.onCancel,
      message = props.message;
  var stringSet = useContext(LocalizationContext).stringSet;
  var deleteMessage = useChannelContext().deleteMessage;
  return /*#__PURE__*/React__default.createElement(Modal, {
    type: ButtonTypes.DANGER,
    disabled: ((_a = message === null || message === void 0 ? void 0 : message.threadInfo) === null || _a === void 0 ? void 0 : _a.replyCount) > 0,
    onCancel: onCancel,
    onSubmit: function () {
      deleteMessage(message).then(function () {
        onCancel();
      });
    },
    submitText: stringSet.MESSAGE_MENU__DELETE,
    titleText: stringSet.MODAL__DELETE_MESSAGE__TITLE
  });
};

export { RemoveMessage as default };
//# sourceMappingURL=RemoveMessageModal.js.map
