';
if (att.file_type === 'image') {
attachmentsHTML += `
`;
} else if (att.file_type === 'audio') {
attachmentsHTML += `
${esc(att.file_name)}
`;
} else if (att.file_type === 'video') {
const videoId = `video_${Date.now()}_${index}`;
videoIds.push({ id: videoId, url: att.file_url, mime: att.mime_type });
attachmentsHTML += `
${esc(att.file_name)}
`;
} else {
const fileSize = att.file_size ? formatFileSize(att.file_size) : '';
attachmentsHTML += `
${esc(att.file_name)}
${fileSize}
`;
}
attachmentsHTML += '