})">Rename</button>
                </div>
            `;

        document
            .body
            .appendChild(overlay);
        document
            .body
            .appendChild(dialog);

        const input = dialog.querySelector('input');
        input.select();
    }

    function closeRenameDialog() {
        const dialog = document.querySelector('.rename-dialog');
        const overlay = document.querySelector('.overlay');
        if (dialog) 
            dialog.remove();
        if (overlay