1 import { getClientID } from '../apps/helper';
2 import type { ProtonConfig } from '../interfaces';
5 * Given an app config the prodId is fixed, so it's convenient to have
6 * it as a mutable export, then set it when the app is loaded
8 export let prodId = '';
10 export const setVcalProdId = (value: string) => {
14 export const getProdIdFromNameAndVersion = (id: string, version: string) => `-//Proton AG//${id} ${version}//EN`;
16 export const getProdId = (config: ProtonConfig) => {
17 const { APP_NAME, APP_VERSION: appVersion } = config;
18 const clientID = getClientID(APP_NAME);
20 return getProdIdFromNameAndVersion(clientID, appVersion);