'use strict';

var React = require('react');
var LocalizationContext = require('../chunks/bundle-BLV9zZk1.js');
var ui_Modal = require('../chunks/bundle-CHERnV8x.js');
var ui_Button = require('./Button.js');
var ui_Label = require('../chunks/bundle-DCPc6-Im.js');
var useKeyDown = require('../chunks/bundle-OAOzXmfa.js');
require('../chunks/bundle-Ck_8lQa-.js');
require('../chunks/bundle-V-_XUHW5.js');
require('../chunks/bundle-5ru_FO5x.js');
require('react-dom');
require('../chunks/bundle-Cd8aIDXf.js');
require('../chunks/bundle-DqTUSoNi.js');
require('./IconButton.js');
require('./Icon.js');
require('@sendbird/uikit-tools');

function MessageFeedbackFailedModal(props) {
    var text = props.text, onCancel = props.onCancel;
    var stringSet = React.useContext(LocalizationContext.LocalizationContext).stringSet;
    var modalRef = React.useRef(null);
    var onKeyDown = useKeyDown.useKeyDown(modalRef, {
        Enter: function () { return onCancel === null || onCancel === void 0 ? void 0 : onCancel(); },
        Escape: function () { return onCancel === null || onCancel === void 0 ? void 0 : onCancel(); },
    });
    return (React.createElement("div", { onKeyDown: onKeyDown },
        React.createElement(ui_Modal.Modal, { contentClassName: 'sendbird-message-feedback-modal-content__mobile', type: ui_Button.ButtonTypes.PRIMARY, onSubmit: onCancel, onClose: onCancel, submitText: stringSet.BUTTON__OK, renderHeader: function () { return (React.createElement("div", { className: 'sendbird-modal__header' },
                React.createElement(ui_Label.Label, { type: ui_Label.LabelTypography.H_1, color: ui_Label.LabelColors.ONBACKGROUND_1, className: 'sendbird-message-feedback-modal-header' }, text))); }, customFooter: React.createElement("div", { className: 'sendbird-message-feedback-modal-footer__root_failed' },
                React.createElement(ui_Button.default, { onClick: onCancel },
                    React.createElement(ui_Label.Label, { type: ui_Label.LabelTypography.BUTTON_3, color: ui_Label.LabelColors.ONCONTENT_1 }, stringSet.BUTTON__OK))) })));
}

module.exports = MessageFeedbackFailedModal;
//# sourceMappingURL=MessageFeedbackFailedModal.js.map
