"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var Dialog_1 = require("@fluentui/react/lib/Dialog");
var Button_1 = require("@fluentui/react/lib/Button");
var debugComponents_module_scss_1 = tslib_1.__importDefault(require("./../debugComponents.module.scss"));
var DebugError_module_scss_1 = tslib_1.__importDefault(require("./DebugError.module.scss"));
var DebugError_resx_1 = tslib_1.__importDefault(require("./DebugError.resx"));
var KillSwitches_1 = require("../../../utilities/KillSwitches");
var DebugError = /** @class */ (function (_super) {
    tslib_1.__extends(DebugError, _super);
    function DebugError(props) {
        var _this = _super.call(this, props) || this;
        _this._handleDismissClick = function () {
            _this.setState({ isShown: false });
        };
        _this.state = {
            isShown: true
        };
        return _this;
    }
    DebugError.prototype.render = function () {
        return (React.createElement("div", { "data-automation-id": 'debugManifestErrorDialog', role: 'dialog' },
            React.createElement(Dialog_1.Dialog, { hidden: !this.state.isShown, dialogContentProps: {
                    type: Dialog_1.DialogType.largeHeader,
                    title: this.props.title
                }, modalProps: {
                    isBlocking: true,
                    containerClassName: debugComponents_module_scss_1.default.dialogContainer,
                    layerProps: !(0, KillSwitches_1.isFixDebugDialogUIKSActivated)()
                        ? {
                            eventBubblingEnabled: true
                        }
                        : undefined
                } },
                React.createElement("p", { className: DebugError_module_scss_1.default.detailText }, this.props.errorText || DebugError_resx_1.default.debugManifestErrorDetail),
                React.createElement("p", { className: DebugError_module_scss_1.default.errorText }, this.props.innerError.toString()),
                React.createElement(Dialog_1.DialogFooter, null,
                    React.createElement(Button_1.PrimaryButton, { "data-automation-id": 'debugManifestErrorDismissButton', onClick: this._handleDismissClick }, DebugError_resx_1.default.debugManifestErrorDismissButtonText)))));
    };
    return DebugError;
}(React.Component));
exports.default = DebugError;
//# sourceMappingURL=DebugError.js.map