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; } sr(r) { logContentCardImpressions(r); } nr(r) { return logContentCardClick(r); } dr() { requestContentCardsRefresh(); } ar() { return !0; } } (ContentCards.ur = 6e4), (ContentCards.cr = 500), (ContentCards.Cr = 1e4);