UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

33 lines (32 loc) 738 B
import { ControlCard, logContentCardClick, logContentCardImpressions, } from "../Card/index.js"; import { requestContentCardsRefresh } from "./request-content-cards-refresh.js"; export default class ContentCards { constructor(r, t) { (this.cards = r), (this.lastUpdated = t), (this.cards = r), (this.lastUpdated = t); } getUnviewedCardCount() { let r = 0; for (const t of this.cards) t.viewed || t instanceof ControlCard || r++; return r; } ur(r) { logContentCardImpressions(r); } cr(r) { return logContentCardClick(r); } Cr() { requestContentCardsRefresh(); } hr() { return !0; } } (ContentCards.mr = 6e4), (ContentCards.gr = 500), (ContentCards.jr = 1e4);