{% if USER.user_type == 1 or USER.user_type == 2 or USER.user_type == 4  %}
<div class="modal fade room-list-modal" id="chatroomList" tabindex="-1" role="dialog" aria-labelledby="chatroomListTitle" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="chatroomListTitle">{{_("Chatroom List")}}</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="table-responsive">
                    <table class="table table-bordered dataTable" width="100%" cellspacing="0">
                        <thead>
                            <tr>
                                <th>{{_("Name")}}</th>
                                <th>{{_("Joiners")}}</th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for my_room in my_rooms %}
                                <tr>
                                    <td>
                                        <a target="_blank" class="" href="{{  url('chat-room', {'chatroomslug':my_room.slug}) }}">
                                            {{my_room.name}}
                                        </a>
                                    </td>
                                    <td>{{my_room.users_count}}</td>
                                    <td class="text-nowrap">
                                        <a href="javascript:void(0)" class="btn btn-info btn-xs view-chatroom" data-room="{{my_room.id}}" title="{{_("Edit Chatroom")}}"><i class="fas fa-edit"></i> {{_("Edit")}}</a>
                                        <a href="javascript:void(0)" class="btn btn-warning btn-xs delete-chats" data-id="{{my_room.id}}" title="{{_("Delete Chats")}}"><i class="fas fa-trash-restore"></i> {{_("Chats")}}</a>

                                        {% if ((SETTINGS['single_room_mode'] != 1) or ((SETTINGS['single_room_mode'] == 1) and (SETTINGS['default_room_slug'] != my_room.slug)))  %}
                                        <a href="javascript:void(0)" class="btn btn-danger btn-xs delete-chatroom" id="room_{{my_room.id}}" data-id="{{my_room.id}}" title="{{_("Delete Chatroom")}}"><i class="fas fa-trash"></i> {{_("Room")}}</a>
                                        {% endif %}

                                    </td>
                                </tr>
                            {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{% endif %}
