"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatContent = ChatContent;
const jsx_runtime_1 = require("react/jsx-runtime");
const cn_1 = require("../../../utils/cn.js");
const MessageList_1 = require("../../organisms/MessageList/index.js");
const EmptyContainer_1 = require("../EmptyContainer/index.js");
require("./ChatContent.css");
const b = (0, cn_1.block)('chat-content');
/**
 * ChatContent - main chat content with state switching (EmptyContainer/MessageList).
 *
 * @param props - Component props
 * @returns React component
 */
function ChatContent(props) {
    var _a;
    const { view, emptyContainerProps, messageListProps, className, qa } = props;
    const isEmptyView = view === 'empty';
    return ((0, jsx_runtime_1.jsx)("div", { className: b(null, className), "data-qa": qa, children: isEmptyView
            ? emptyContainerProps && (0, jsx_runtime_1.jsx)(EmptyContainer_1.EmptyContainer, Object.assign({}, emptyContainerProps))
            : messageListProps && ((0, jsx_runtime_1.jsx)("div", { className: b('message-list-container'), children: (0, jsx_runtime_1.jsx)(MessageList_1.MessageList, Object.assign({}, messageListProps, { className: b('message-list', messageListProps.className), qa: (_a = messageListProps.qa) !== null && _a !== void 0 ? _a : `message-list${qa ? `-${qa}` : ''}` })) })) }));
}
//# sourceMappingURL=ChatContent.js.map
