1 | 'use strict';
|
2 |
|
3 | const ConceptImagePresenter = require('./concept-image');
|
4 | const ResponsiveGridsPresenter = require('./responsive-grids');
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | class ConceptPresenter {
|
12 | constructor (data) {
|
13 | this.data = data;
|
14 | }
|
15 | get imageUrl () {
|
16 | if (this.data) {
|
17 | const image = new ConceptImagePresenter({
|
18 | items: this.data.items
|
19 | });
|
20 | return image.imageUrl;
|
21 | }
|
22 | }
|
23 | get responsiveGrids () {
|
24 | if (this.data && this.data.show) {
|
25 | const rgrids = new ResponsiveGridsPresenter({show: this.data.show});
|
26 | return rgrids.responsiveGrids;
|
27 | }
|
28 | }
|
29 | }
|
30 |
|
31 | module.exports = ConceptPresenter;
|