<div class="accordion accordion-bordered mt-3" id="accordionChatGeneral">
    <div class="card accordion-item active">
        <h2 class="accordion-header" id="headingChatGeneral">
            <button type="button" class="accordion-button" data-bs-toggle="collapse"
                data-bs-target="#accordionChatGeneralTip" aria-expanded="false" aria-controls="accordionChatGeneralTip">
                <h3><?= lang("Chat.chat") ?></h3>
            </button>
        </h2>
        <div id="accordionChatGeneralTip" class="accordion-collapse collapse show"
            data-bs-parent="#accordionChatGeneral">
            <div class="accordion-body">
                <div class="container-xxl flex-grow-1 container-p-y" id="chat-general" data-id="<?= null ?>">
                    <div class="app-chat card overflow-hidden">
                        <div class="row g-0">

                            <!-- Chat & Contacts -->
                            <div class="col app-chat-contacts app-sidebar flex-grow-0 overflow-hidden border-end"
                                id="app-chat-contacts">
                                <div class="sidebar-header">
                                    <div class="d-flex align-items-center me-3 me-lg-0">
                                        <div class="flex-shrink-0 avatar me-3">
                                            <span class="avatar-initial rounded-circle bg-label-success">U</span>
                                        </div>

                                        <div class="flex-grow-1 input-group input-group-merge rounded-pill">
                                            <span class="input-group-text" id="basic-addon-search31">
                                                <i class="ti ti-search"></i>
                                            </span>
                                            <input type="text" class="form-control chat-search-input"
                                                placeholder="Buscar..." aria-label="Buscar..."
                                                aria-describedby="basic-addon-search31" />
                                        </div>
                                    </div>
                                    <i class="ti ti-x cursor-pointer d-lg-none d-block position-absolute mt-2 me-1 top-0 end-0"
                                        data-overlay data-bs-toggle="sidebar" data-target="#app-chat-contacts"></i>
                                </div>
                                <hr class="container-m-nx m-0" />
                                <div class="sidebar-body">

                                    <!-- CLIENTES -->
                                    <ul class="list-unstyled chat-contact-list mb-0" id="contact-list">
                                        <li class="chat-contact-list-item chat-contact-list-item-title">
                                            <h5 class="text-primary mb-0">Contactos</h5>
                                        </li>
                                        <!-- <li class="chat-contact-list-item">
                                            <a class="d-flex align-items-center">
                                                <div class="avatar d-block flex-shrink-0">
                                                    <span class="avatar-initial rounded-circle bg-label-primary">JJ</span>
                                                </div>
                                                <div class="chat-contact-info flex-grow-1 ms-2">
                                                    <h6 class="chat-contact-name text-truncate m-0">Jaime Jimenez</h6>
                                                </div>
                                            </a>
                                        </li> -->

                                    </ul>

                                </div>
                            </div>
                            <!-- /Chat contacts -->

                            <!-- Chat History -->
                            <div class="col app-chat-history bg-body">
                                <div class="chat-history-wrapper ">
                                    <div class="chat-history-header border-bottom">
                                        <div class="d-flex justify-content-between align-items-center">
                                            <div class="d-flex overflow-hidden align-items-center">
                                                <i class="ti ti-menu-2 ti-sm cursor-pointer d-lg-none d-block me-2"
                                                    data-bs-toggle="sidebar" data-overlay
                                                    data-target="#app-chat-contacts"></i>
                                                <div class="avatar d-block flex-shrink-0">
                                                    <span
                                                        class="avatar-initial rounded-circle bg-label-primary">P</span>
                                                </div>
                                                <div class="chat-contact-info flex-grow-1 ms-2">
                                                    <h6 class="m-0"></h6>
                                                    <small class="user-status text-muted"></small>
                                                </div>
                                            </div>
                                            <div class="d-flex align-items-center">
                                                <div class="dropdown d-flex align-self-center">
                                                    <button class="btn p-0" type="button" id="chat-header-actions"
                                                        data-bs-toggle="dropdown" aria-haspopup="true"
                                                        aria-expanded="false">
                                                        <i class="ti ti-dots-vertical"></i>
                                                    </button>
                                                    <!-- <div class="dropdown-menu dropdown-menu-end"
                                                        aria-labelledby="chat-header-actions">
                                                        <a class="dropdown-item" href="javascript:void(0);">Silenciar
                                                            Conversacion</a>
                                                        <a class="dropdown-item" href="javascript:void(0);">Limpiar
                                                            Conversacion</a>
                                                    </div> -->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="chat-history-body bg-body ">
                                        <ul class="list-unstyled chat-history" id="chat-conversation">


                                        </ul>
                                    </div>
                                    <!-- Chat message form -->
                                    <div class="chat-history-footer shadow-sm">
                                        <div
                                            class="form-send-message d-flex justify-content-between align-items-center">
                                            <input class="form-control message-input border-0 me-3 shadow-none"
                                                placeholder="<?=lang('Chat.write_message_placeholder')?>" />
                                            <div class="message-actions d-flex align-items-center">

                                                <div class="message-actions d-flex align-items-center">
                                                    <a class="btn btn-primary d-flex send-msg-btn" style="color:white"
                                                        id="send-msg-btn-deparment">
                                                        <i class="ti ti-send me-md-1 me-0"></i>
                                                        <span class="align-middle d-md-inline-block">Enviar</span>
                                                    </a>
                                                    <a class="btn btn-primary d-flex send-msg-btn"
                                                        id="send-msg-btn-internal">
                                                        <i class="ti ti-send me-md-1 me-0"></i>
                                                        <span class="align-middle d-md-inline-block ">Enviar</span>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /Chat History -->

                                <div class="app-overlay"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <?= $this->section('css') ?>
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.css') ?>" />
    <link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
    <?= $this->endSection() ?>
    <!------------------------------------------------------->
    <!-- Código JS logica -->
    <!------------------------------------------------------->
    <?= $this->section("additionalExternalJs") ?>
    <script type="module" src="<?= site_url('assets/js/safekat/pages/chatGeneral.js') ?>"></script>
    <script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
    <!-- <script src="<?= site_url('js_loader/chat_js') ?>"></script> -->
    <?= $this->endSection() ?>