1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.BrowseCarousel = exports.BrowseCarouselItem = void 0;
|
19 | class BrowseCarouselItem {
|
20 | |
21 |
|
22 |
|
23 |
|
24 | constructor(options) {
|
25 | this.title = options.title;
|
26 | if (options.url) {
|
27 | this.openUrlAction = {
|
28 | url: options.url,
|
29 | };
|
30 | }
|
31 | if (options.openUrlAction) {
|
32 | this.openUrlAction = options.openUrlAction;
|
33 | }
|
34 | this.description = options.description;
|
35 | this.footer = options.footer;
|
36 | this.image = options.image;
|
37 | }
|
38 | }
|
39 | exports.BrowseCarouselItem = BrowseCarouselItem;
|
40 | const isOptions = (options) => {
|
41 | const test = options;
|
42 | return Array.isArray(test.items);
|
43 | };
|
44 | class BrowseCarousel {
|
45 | constructor(options, ...items) {
|
46 | if (!options) {
|
47 | this.items = [];
|
48 | return;
|
49 | }
|
50 | if (Array.isArray(options)) {
|
51 | this.items = options;
|
52 | return;
|
53 | }
|
54 | if (isOptions(options)) {
|
55 | this.imageDisplayOptions = options.display;
|
56 | this.items = options.items;
|
57 | return;
|
58 | }
|
59 | this.items = [options].concat(items);
|
60 | }
|
61 | }
|
62 | exports.BrowseCarousel = BrowseCarousel;
|
63 |
|
\ | No newline at end of file |