<form id="<?=$id?>" data-id="<?= $entity->id ?>">
    <div class="row">
        <div class="col-md-12 mb-2">
            <label for="chat-department-display"><?= lang('Chat.datatable_departments.name') ?></label>
            <input type="text" name="display" id="chat-department-display" value="<?= $entity->display ?>" class="form-control" />
        </div>
        <div class="col-md-12 mb-2">
            <label for="chat-department-description"><?= lang('Chat.datatable_departments.description') ?></label>
            <textarea rows="5" cols="5" type="text" name="description" id="chat-department-description" class="form-control"><?= $entity->description ?></textarea>
        </div>
        <div class="col-md-12 mb-5">
            <button type="button" class="btn btn-primary w-100" id="btn-chat-department-update"><i class="ti icon-base ti-refresh me-2"></i>
                <?= lang("App.global_save") ?>
            </button>
        </div>
    </div>
    <div class="accordion accordion-bordered" id="accordionChatDepartmentUser">
        <div class="card accordion-item active">
            <h2 class="accordion-header">
                <button type="button" class="accordion-button" data-bs-toggle="collapse"
                    data-bs-target="#accordionChatDepartmentUserTip" aria-expanded="false"
                    aria-controls="accordionChatDepartmentUserTip">
                    <h4><?= lang("Chat.department_users") ?></h4>
                </button>
            </h2>
            <div id="accordionChatDepartmentUserTip" class="accordion-collapse"
                data-bs-parent="#accordionChatDepartment">
                <div class="accordion-body">
                    <div class="col-md-12">
                        <div class="row">
                            <div class="col-md-10">
                                <select id="selectChatDepartmentUser" class="select2 form-select" data-allow-clear="true"></select>
                                <div id="floatingInputHelp" class="form-text"><?=lang('Chat.help_select_chat_department_user')?></div>
                            </div>
                            <div class="col-md-2">
                                <button type="button" class="btn btn-primary w-100" id="add-user-admin-chat-department"><i class="ti icon-base ti-plus"></i></button>
                            </div>
                        </div>
                        <?= view("themes/vuexy/components/tables/chat_department_users_table", ["id" => "tableChatDepartmentUsers", "entity" => $entity]) ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>