<div class="accordion accordion-bordered mt-3" id="accordionChatFactura">
    <div class="card accordion-item">
        <h2 class="accordion-header" id="headingChatFactura">
            <button type="button" class="accordion-button collapsed" data-bs-toggle="collapse"
                data-bs-target="#accordionChatFacturaTip" aria-expanded="false"
                aria-controls="accordionChatFacturaTip">
                <h3><?= lang("Chat.chat") ?></h3>
            </button>
        </h2>
        <div id="accordionChatFacturaTip" class="accordion-collapse collapse"
            data-bs-parent="#accordionChatFactura">
            <div class="accordion-body">
                <div class="nav-align-top">
                    <ul class="nav nav-pills mb-4" role="tablist">
                        <li class="nav-item">
                            <button type="button" class="nav-link <?=auth()->user()->inGroup('admin') || auth()->user()->inGroup('beta') ? "" : "active" ?>" role="tab" data-bs-toggle="tab" data-bs-target="#navs-pills-top-chat" aria-controls="navs-pills-top-internal-chat" aria-selected="false">Chat</button>
                        </li>
                        <?php if (auth()->user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?>
                        <li class="nav-item">
                            <button type="button" class="nav-link active" role="tab" data-bs-toggle="tab" data-bs-target="#navs-pills-top-internal-messages" aria-controls="navs-pills-top-internal-messages" aria-selected="false">Mensajes internos</button>
                        </li>
                        <?php } ?>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane fade <?=auth()->user()->inGroup('admin') || auth()->user()->inGroup('beta') ? "" : "show active" ?>" id="navs-pills-top-chat" role="tabpanel">
                            <?= view("themes/vuexy/components/chat_factura", data: ["modelId" => $modelId,"type" => "factura"]) ?>
                        </div>
                        <?php if (auth()->user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?>
                        <div class="tab-pane fade show active" id="navs-pills-top-internal-messages" role="tabpanel">
                        <?= view("themes/vuexy/components/internal_messages", data: ["modelId" => $modelId,"type" => "factura"]) ?>
                        </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>