"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "ErrorOverlayLayout", {
    enumerable: true,
    get: function() {
        return ErrorOverlayLayout;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _Dialog = require("../../Dialog");
const _Overlay = require("../../Overlay");
const _ErrorPagination = require("../ErrorPagination/ErrorPagination");
const _ToolButtonsGroup = require("../../ToolButtonsGroup/ToolButtonsGroup");
const _VersionStalenessInfo = require("../../VersionStalenessInfo");
function ErrorOverlayLayout(param) {
    let { errorMessage, errorType, children, errorCode, error, debugInfo, isBuildError, onClose, temporaryHeaderChildren, versionInfo, readyErrors, activeIdx, setActiveIndex } = param;
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Overlay.Overlay, {
        fixed: isBuildError,
        children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Dialog.Dialog, {
            type: "error",
            "aria-labelledby": "nextjs__container_errors_label",
            "aria-describedby": "nextjs__container_errors_desc",
            onClose: onClose,
            children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogContent, {
                children: [
                    /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogHeader, {
                        className: "nextjs-container-errors-header",
                        children: [
                            /*#__PURE__*/ (0, _jsxruntime.jsx)(_ErrorPagination.ErrorPagination, {
                                readyErrors: readyErrors != null ? readyErrors : [],
                                activeIdx: activeIdx != null ? activeIdx : 0,
                                onActiveIndexChange: setActiveIndex != null ? setActiveIndex : ()=>{}
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                                className: "nextjs__container_errors__error_title",
                                // allow assertion in tests before error rating is implemented
                                "data-nextjs-error-code": errorCode,
                                children: [
                                    /*#__PURE__*/ (0, _jsxruntime.jsx)("h1", {
                                        id: "nextjs__container_errors_label",
                                        className: "nextjs__container_errors_label",
                                        children: errorType
                                    }),
                                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_ToolButtonsGroup.ToolButtonsGroup, {
                                        error: error,
                                        debugInfo: debugInfo
                                    })
                                ]
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsx)(_VersionStalenessInfo.VersionStalenessInfo, {
                                versionInfo: versionInfo
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
                                id: "nextjs__container_errors_desc",
                                className: "nextjs__container_errors_desc",
                                children: errorMessage
                            }),
                            temporaryHeaderChildren
                        ]
                    }),
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_Dialog.DialogBody, {
                        className: "nextjs-container-errors-body",
                        children: children
                    })
                ]
            })
        })
    });
}

if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
  Object.defineProperty(exports.default, '__esModule', { value: true });
  Object.assign(exports.default, exports);
  module.exports = exports.default;
}

//# sourceMappingURL=ErrorOverlayLayout.js.map