"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ChatPanel;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const react_native_1 = require("react-native");
const zero = tslib_1.__importStar(require("../../ui"));
const chat_1 = require("../chat/chat");
const chat_box_1 = require("../chat/chat-box");
const { flex, bg, r, borders, p, px, py, text, layout } = zero;
function ChatPanel({ isLive, isConnected, messagesPerMinute = 0, shownMessages = 50, emojiData = null, emojiPicker, }) {
    return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
            flex.values[1],
            bg.neutral[900],
            borders.width.thin,
            borders.color.neutral[700],
            layout.flex.column,
            r.lg,
        ], children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
                    layout.flex.row,
                    layout.flex.spaceBetween,
                    layout.flex.alignCenter,
                    borders.bottom.width.thin,
                    borders.bottom.color.neutral[700],
                    p[4],
                ], children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [text.white, { fontSize: 18, fontWeight: "600" }], children: "Chat" }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [layout.flex.row, layout.flex.alignCenter], children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
                                    { width: 6, height: 6, borderRadius: 3 },
                                    isLive && isConnected ? bg.green[500] : bg.gray[500],
                                ] }), (0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: [text.gray[400], { fontSize: 12, marginLeft: 8 }], children: [messagesPerMinute, " msg/min"] })] })] }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [flex.values[1], px[2], { minHeight: 0 }], children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: [flex.values[1], { minHeight: 0 }], children: (0, jsx_runtime_1.jsx)(chat_1.Chat, { shownMessages: shownMessages }) }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [{ flexShrink: 0 }], children: (0, jsx_runtime_1.jsx)(chat_box_1.ChatBox, { emojiData: emojiData, emojiPicker: emojiPicker, chatBoxStyle: [
                                bg.gray[700],
                                borders.width.thin,
                                borders.color.gray[600],
                                r.md,
                                p[3],
                                !isConnected && { opacity: 0.6 },
                            ] }) })] })] }));
}
//# sourceMappingURL=chat-panel.js.map