<% const body = `

📊 Overview

${statistics.games || 0} Games
${(statistics.global_packages || 0) + (statistics.local_mods || 0)} Mods
${statistics.total_packages || 0} Total

⚡ Quick Install

${typeof csrfToken !== 'undefined' && csrfToken ? `` : ''}
${allContent.length === 0 ? `

📭 No Extensions Installed

Install games, mods, and texture packs from ContentDB or add them manually.

Browse ContentDB
` : `
${allContent.map(ext => { const type = ext.package_type || ext.type; const typeIcon = type === 'game' ? '🎮' : type === 'txp' ? '🎨' : 'đŸ“Ļ'; const typeBadge = type === 'game' ? 'success' : type === 'txp' ? 'warning' : 'primary'; const sourceIcon = ext.source === 'contentdb' ? '🌐' : '📁'; return `

${typeIcon} ${ext.title || ext.name}

${sourceIcon} ${ext.author || 'Local'} ${ext.source === 'contentdb' ? '(ContentDB)' : '(Local)'}
${type === 'txp' ? 'Texture Pack' : type.charAt(0).toUpperCase() + type.slice(1)}

${ext.short_description || ext.description || 'No description available.'}

Location: ${ext.install_location === 'global' || ext.location === 'global' ? 'Global' : ext.install_location ? ext.install_location.replace('world:', '') : ext.location || 'Games'}
${ext.version ? `
Version: ${ext.version}
` : ''}
Modified: ${ext.installed_at ? new Date(ext.installed_at).toLocaleDateString() : new Date(ext.lastModified).toLocaleDateString()}
${ext.dependencies && ext.dependencies.length > 0 ? `
Dependencies (${ext.dependencies.length}):
${ext.dependencies.map(dep => typeof dep === 'string' ? dep : `${dep.author}/${dep.name}` ).join(', ')}
` : ''}
${ext.contentdb_url ? ` View on ContentDB ` : ''} ${ext.source === 'contentdb' ? ` ` : ''}
`; }).join('')}
`}
`; %> <%- include('../layout', { body: body, currentPage: 'extensions', title: title }) %>