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;
};
import { jsx as _jsx } from "react/jsx-runtime";
// Import PatternFly components
import { Modal } from '@patternfly/react-core';
import { ChatbotDisplayMode } from '../Chatbot';
export const ChatbotModal = (_a) => {
    var { children, displayMode = ChatbotDisplayMode.default, className, isOpen, isCompact } = _a, props = __rest(_a, ["children", "displayMode", "className", "isOpen", "isCompact"]);
    const modal = (_jsx(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 === ChatbotDisplayMode.fullscreen || displayMode === ChatbotDisplayMode.embedded) && isOpen) {
        return _jsx("div", { className: "pf-v6-c-backdrop pf-chatbot__backdrop", children: modal });
    }
    return modal;
};
export default ChatbotModal;
