1let lastSetBadgeCount = 0;
2const badgeModule = {
3    addListener: () => { },
4    removeListeners: () => { },
5    getBadgeCountAsync: async () => {
6        return lastSetBadgeCount;
7    },
8    setBadgeCountAsync: async (badgeCount, options) => {
9        // If this module is loaded in SSR (NextJS), we can't modify the badge.
10        // It also can't load the badgin module, that instantly invokes methods on window.
11        if (typeof window === 'undefined') {
12            return false;
13        }
14        const badgin = require('badgin');
15        if (badgeCount > 0) {
16            badgin.set(badgeCount, options);
17        }
18        else {
19            badgin.clear();
20        }
21        lastSetBadgeCount = badgeCount;
22        return true;
23    },
24};
25export default badgeModule;
26//# sourceMappingURL=BadgeModule.web.js.map