import React__default, { useContext } from 'react';
import Modal from '../../ui/Modal.js';
import { ButtonTypes } from '../../ui/Button.js';
import { a as LocalizationContext } from '../../LocalizationContext-299b1d45.js';
import { u as useChannelContext } from '../../ChannelProvider-e50a1789.js';
import 'react-dom';
import '../../index-f0cb5427.js';
import '../../ui/Icon.js';
import 'prop-types';
import '../../ui/IconButton.js';
import '../../tslib.es6-ea477498.js';
import '../../index-256d00f1.js';
import '../../stringSet-8039f73a.js';
import '../../MediaQueryContext-84b087e0.js';
import '../../index-14786153.js';
import '../../UserProfileContext-53d89b5e.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../_rollupPluginBabelHelpers-d746227b.js';
import '../../index-a8115de7.js';
import '../../topics-948f8346.js';
import '../../index-b16ab63e.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../compareIds-4e3d3f6c.js';
import '../../const-40f65aaf.js';
import '@sendbird/chat/groupChannel';
import '../../uuid-2d756af4.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
