export default defineEventHandler(async (event) => {
  // Set proper content type for manifest
  setHeader(event, 'Content-Type', 'application/manifest+json')
  setHeader(event, 'Cache-Control', 'public, max-age=0, must-revalidate')
  
  const manifest = {
    name: 'RepoDructor Music Player',
    short_name: 'RepoDructor',
    description: 'A beautiful glassmorphism music player for your local network',
    theme_color: '#8b5cf6',
    background_color: '#0f172a',
    display: 'standalone',
    orientation: 'portrait',
    scope: '/',
    start_url: '/',
    categories: ['music', 'entertainment'],
    lang: 'es',
    dir: 'ltr',
    icons: [
      {
        src: '/logo-192.png',
        sizes: '192x192',
        type: 'image/png',
        purpose: 'any'
      },
      {
        src: '/logo-512.png',
        sizes: '512x512',
        type: 'image/png',
        purpose: 'any'
      },
      {
        src: '/logo-maskable-512.png',
        sizes: '512x512',
        type: 'image/png',
        purpose: 'maskable'
      },
      {
        src: '/logo-192.png',
        sizes: '192x192',
        type: 'image/png',
        purpose: 'maskable'
      }
    ]
  }
  
  return manifest
})