1/**
2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import { CommonConstants } from '../constants/CommonConstants';
17
18/**
19 * Item info of long press menu.
20 */
21export class MenuInfo {
22  /**
23   * Item type. see CommonConstants.MENU_TYPE_FIXED and CommonConstants.MENU_TYPE_DYNAMIC.
24   */
25  menuType: number = CommonConstants.MENU_TYPE_FIXED;
26
27  /**
28   * Image source for this item.
29   */
30  menuImgSrc: any = null;
31
32  /**
33   * Menu text for this item.
34   */
35  menuText: any = null;
36
37  /**
38   * True if this item is enabled.
39   */
40  menuEnabled = true;
41
42  /**
43   * Callback when item is clicked.
44   */
45  onMenuClick: Function = () => [];
46
47  /**
48   * shortcut icon Id
49   */
50  shortcutIconId = CommonConstants.INVALID_VALUE;
51
52  /**
53   * shortcut label Id
54   */
55  shortcutLabelId = CommonConstants.INVALID_VALUE;
56
57  /**
58   * bundleName
59   */
60  bundleName: string | undefined;
61
62  /**
63  * moduleName
64  */
65  moduleName: string | undefined;
66}
67