import type { APIRoute } from 'astro';
import { site } from '../data/site';

export const GET: APIRoute = () =>
  new Response(
    JSON.stringify({
      name: site.name,
      short_name: 'Årshjul',
      start_url: '/',
      display: 'standalone',
      background_color: '#f6f8f7',
      theme_color: '#117ca0',
      lang: 'sv-SE',
      description: site.defaultDescription,
      icons: [
        {
          src: '/favicon.svg',
          sizes: 'any',
          type: 'image/svg+xml',
        },
      ],
    }),
    {
      headers: {
        'Content-Type': 'application/manifest+json; charset=utf-8',
      },
    },
  );
