<div class="accordion accordion-bordered mt-3" id="accordionChatPedido">
    <div class="card accordion-item">
        <h2 class="accordion-header" id="headingChatPedido">
            <button type="button" class="accordion-button collapsed" data-bs-toggle="collapse"
                data-bs-target="#accordionChatPedidoTip" aria-expanded="false"
                aria-controls="accordionChatPedidoTip">
                <h3><?= lang("Chat.chat") ?></h3>
            </button>
        </h2>
        <div id="accordionChatPedidoTip" class="accordion-collapse collapse"
            data-bs-parent="#accordionChatPedido">
            <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('cliente-administrador','cliente') ? "" : "active" ?>" role="tab" data-bs-toggle="tab" data-bs-target="#navs-pills-top-chat" aria-controls="navs-pills-top-internal-chat" aria-selected="false"><?=lang('Chat.messages_client')?></button>
                        </li>
                        <?php if (!auth()->user()->inGroup('cliente-administrador','cliente')) { ?>
                        <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"><?=lang('Chat.messages_internal')?></button>
                        </li>
                        <?php } ?>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane fade <?=!auth()->user()->inGroup('cliente-administrador','cliente') ? "" : "show active" ?>" id="navs-pills-top-chat" role="tabpanel">
                            <?= view("themes/vuexy/components/chat_pedido", data: ["modelId" => $modelId, "type" => "pedido"]) ?>
                        </div>
                        <?php if (!auth()->user()->inGroup('cliente-administrador','cliente')) { ?>
                            <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" => "pedido"]) ?>
                            </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>