"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatbotHeaderTitle = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_core_1 = require("@patternfly/react-core");
const Chatbot_1 = require("../Chatbot/Chatbot");
const ChatbotHeaderTitle = ({ className, children, displayMode, showOnFullScreen, showOnDocked, showOnEmbedded, showOnDrawer, showOnDefault }) => {
    const renderChildren = () => {
        if (displayMode) {
            /* eslint-disable indent */
            switch (displayMode) {
                case Chatbot_1.ChatbotDisplayMode.fullscreen:
                    return showOnFullScreen !== null && showOnFullScreen !== void 0 ? showOnFullScreen : showOnDefault;
                case Chatbot_1.ChatbotDisplayMode.docked:
                    return showOnDocked !== null && showOnDocked !== void 0 ? showOnDocked : showOnDefault;
                case Chatbot_1.ChatbotDisplayMode.embedded:
                    return showOnEmbedded !== null && showOnEmbedded !== void 0 ? showOnEmbedded : showOnDefault;
                case Chatbot_1.ChatbotDisplayMode.drawer:
                    return showOnDrawer !== null && showOnDrawer !== void 0 ? showOnDrawer : showOnDefault;
                default:
                    return showOnDefault;
            }
            /* eslint-enable indent */
        }
        else {
            return children;
        }
    };
    return ((0, jsx_runtime_1.jsx)(react_core_1.SplitItem, { isFilled: true, className: `pf-chatbot__title ${className || ''}`, children: renderChildren() }));
};
exports.ChatbotHeaderTitle = ChatbotHeaderTitle;
exports.default = exports.ChatbotHeaderTitle;
