import { Request, Response } from 'express';

const getMenus = (req: Request, res: Response) => {
    const result = {
        code: 0,
        success: true,
        data: {
            routes: [
                {
                    "path": "/welcome",
                    "key": "",
                    "name": "welcome",
                    "icon": "HomeOutlined",
                    "access": "",
                    "component": "Welcome",
                    "title": "首页",
                    "routes": []
                },
                {
                    "path": "/alarm/alarm-list",
                    "key": "",
                    "name": "alarm-list",
                    "icon": "WarningOutlined",
                    "access": "",
                    "component": "Hidden",
                    "title": "告警列表",
                    "routes": []
                },
                {
                    "path": "alarm_rules",
                    "key": "",
                    "name": "alarm_rules",
                    "icon": "OrderedListOutlined",
                    "access": "",
                    "component": "Hidden",
                    "title": "告警规则",
                    "routes": []
                },
                {
                    "path": "interfaceManage",
                    "key": "",
                    "name": "interfaceManage",
                    "icon": "BranchesOutlined",
                    "access": "",
                    "component": "Hidden",
                    "title": "接口管理",
                    "routes": []
                },
                {
                    "path": "userList",
                    "key": "",
                    "name": "userList",
                    "icon": "UserOutlined",
                    "access": "",
                    "component": "Hidden",
                    "title": "用户列表",
                    "routes": []
                }
            ]
        },
        msg: "获取成功"
      }
    return res.json(result);
};

export default {
  'POST /api/mock/getMenus': getMenus,
};
