1 | import { IHtmlEngineHelper } from './html-engine-helper.interface';
|
2 | import Configuration from '../../configuration';
|
3 |
|
4 | export class IsNotToggleHelper implements IHtmlEngineHelper {
|
5 | constructor() {}
|
6 |
|
7 | public helperFunc(context: any, type, options) {
|
8 | let result = Configuration.mainData.toggleMenuItems.indexOf(type);
|
9 |
|
10 | if (Configuration.mainData.toggleMenuItems.indexOf('all') !== -1) {
|
11 | return options.inverse(context);
|
12 | } else if (result !== -1) {
|
13 | return options.fn(context);
|
14 | } else {
|
15 | return options.inverse(context);
|
16 | }
|
17 | }
|
18 | }
|