import { MetadataRoute } from 'next'

export default function manifest(): MetadataRoute.Manifest {
    const baseUrl = process.env.NEXT_PUBLIC_BASE_URL ?? 'https://mobile.raikyakun.app'

    return {
        id: '/',
        theme_color: '#f69435',
        background_color: '#1a2484',
        display: 'standalone',
        scope: '/',
        start_url: '/',
        name: 'らいきゃくん通知',
        short_name: 'らいきゃくん通知',
        description: 'モバイルデバイスでらいきゃくんの通知を受け取ることが出来ます',
        icons: [
            { src: '/images/maskable_icon_x128.png', sizes: '128x128', type: 'image/png', purpose: 'maskable' },
            { src: '/images/maskable_icon_x144.png', sizes: '144x144', type: 'image/png', purpose: 'any' },
            { src: '/images/maskable_icon_x192.png', sizes: '192x192', type: 'image/png', purpose: 'maskable' },
            { src: '/images/maskable_icon_x384.png', sizes: '384x384', type: 'image/png', purpose: 'maskable' },
            { src: '/images/maskable_icon_x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
        ],
related_applications: [
            { platform: 'webapp', url: `${baseUrl}/manifest.webmanifest` },
        ],
        prefer_related_applications: false,
    }
}
