<% const body = `

📊 Statistics

${statistics.total_packages || 0} Total Packages
${statistics.global_packages || 0} Global Mods
${statistics.world_packages || 0} World-specific
${statistics.worlds_with_packages || 0} Worlds with Mods

🔍 Filter Packages

All Locations Global Mods
World-specific filters coming soon
${packages.length === 0 ? `

📭 No Packages Installed

You haven't installed any packages yet from ContentDB.

Browse ContentDB
` : `
${packages.map(pkg => `

${pkg.title || pkg.name}

by ${pkg.author}
${pkg.package_type || 'mod'}

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

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