import { PageType } from "../../../commons/types/page-type"; import { Event, EventType } from "../../../event/core/event"; /** * Shelf view data. * * @interface ShelfViewData */ export interface ShelfViewData { page: PageType; shelf: string; locale?: string; channel?: string; session?: string; anonymous?: string; } /** * DataLayer Shelf view event. * * @export * @class DataLayerShelfView * @extends {Event} */ export class DataLayerShelfView extends Event { public page: PageType; public area: string; public shelf: string; public locale?: string; public channel?: string; public type: EventType = EventType.FrontView; /** * Creates an instance of DataLayerShelfView. * * @param {ShelfViewData} data * @memberof DataLayerShelfView */ constructor({ page, shelf, locale, channel, session, anonymous }: ShelfViewData) { super(session, anonymous); this.page = page; this.shelf = shelf; this.locale = locale; this.channel = channel; } }