"use strict";
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatbotModal = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
// Import PatternFly components
const react_core_1 = require("@patternfly/react-core");
const Chatbot_1 = require("../Chatbot");
const ChatbotModal = (_a) => {
    var { children, displayMode = Chatbot_1.ChatbotDisplayMode.default, className, isOpen, isCompact } = _a, props = __rest(_a, ["children", "displayMode", "className", "isOpen", "isCompact"]);
    const modal = ((0, jsx_runtime_1.jsx)(react_core_1.Modal, Object.assign({ isOpen: isOpen, ouiaId: "ChatbotModal", "aria-labelledby": "chatbot-modal-title", "aria-describedby": "chatbot-modal", className: `pf-chatbot__chatbot-modal pf-chatbot__chatbot-modal--${displayMode} ${isCompact ? 'pf-m-compact' : ''} ${className}`, backdropClassName: "pf-chatbot__chatbot-modal-backdrop" }, props, { children: children })));
    if ((displayMode === Chatbot_1.ChatbotDisplayMode.fullscreen || displayMode === Chatbot_1.ChatbotDisplayMode.embedded) && isOpen) {
        return (0, jsx_runtime_1.jsx)("div", { className: "pf-v6-c-backdrop pf-chatbot__backdrop", children: modal });
    }
    return modal;
};
exports.ChatbotModal = ChatbotModal;
exports.default = exports.ChatbotModal;
