sult;  // Set the PDF preview source
                            pdfPreviewContainer.style.display = "block";  // Show the preview container
                        });

                        fileListDiv.appendChild(fileItem);
                    };

                    reader.readAsDataURL(file);
                } else {
                    alert("Please select a valid PDF file.");
                }
            }
        }

        /**
         * Resets the fields in the declaration modal when it is show