export const PWA_ICON_192 = '/icons/logo192.png';
export const PWA_ICON_512 = '/icons/logo512.png';

export function buildPwaManifestIcons(logo192?: string, logo512?: string) {
  const icon192 = logo192 ?? PWA_ICON_192;
  const icon512 = logo512 ?? PWA_ICON_512;

  return [
    {
      src: icon192,
      sizes: '192x192',
      type: 'image/png',
      purpose: 'any',
    },
    {
      src: icon512,
      sizes: '512x512',
      type: 'image/png',
      purpose: 'any',
    },
    {
      src: icon192,
      sizes: '192x192',
      type: 'image/png',
      purpose: 'maskable',
    },
    {
      src: icon512,
      sizes: '512x512',
      type: 'image/png',
      purpose: 'maskable',
    },
  ];
}
