---
/**
 * Returns the releases object, injecting checksums dynamically.
 * @param checksums Record<string, string> mapping filenames to SHA-256 hashes
 */
export function getReleasesWithChecksums(checksums: Record<string, string>) {
  return {
    macos: {
      universal: {
        link: 'https://github.com/zen-browser/desktop/releases/latest/download/zen.macos-universal.dmg',
        label: 'Universal',
        checksum: checksums['zen.macos-universal.dmg'],
      },
    },
    windows: {
      x86_64: {
        link: 'https://github.com/zen-browser/desktop/releases/latest/download/zen.installer.exe',
        label: '64-bit (Recommended)',
        checksum: checksums['zen.installer.exe'],
      },
      arm64: {
        link: 'https://github.com/zen-browser/desktop/releases/latest/download/zen.installer-arm64.exe',
        label: 'ARM64',
        checksum: checksums['zen.installer-arm64.exe'],
      },
    },
    linux: {
      x86_64: {
        tarball: {
          link: 'https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-x86_64.tar.xz',
          label: 'Tarball x86_64',
          checksum: checksums['zen.linux-x86_64.tar.xz'],
        },
        appImage: {
          link: 'https://github.com/zen-browser/desktop/releases/latest/download/zen-x86_64.AppImage',
          label: 'AppImage x86_64',
          checksum: checksums['zen-x86_64.AppImage'],
        },
      },
      aarch64: {
        tarball: {
          link: 'https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-aarch64.tar.xz',
          label: 'Tarball aarch64',
          checksum: checksums['zen.linux-aarch64.tar.xz'],
        },
        appImage: {
          link: 'https://github.com/zen-browser/desktop/releases/latest/download/zen-aarch64.AppImage',
          label: 'AppImage aarch64',
          checksum: checksums['zen-aarch64.AppImage'],
        },
      },
      flathub: {
        all: {
          link: 'https://flathub.org/apps/app.zen_browser.zen',
          label: 'Flathub',
        },
      },
    },
  }
}
---
