import { PushService } from "./push-service.js";
export function createPushNotificationSender(logger, tokenStore) {
    const pushService = new PushService(logger, tokenStore);
    return {
        async send(payload) {
            const tokens = tokenStore.getAllTokens();
            logger.info({ tokenCount: tokens.length }, "Sending push notification");
            if (tokens.length === 0) {
                return;
            }
            await pushService.sendPush(tokens, payload);
        },
    };
}
//# sourceMappingURL=notifications.js.map