const getters = {
  isMobile: state => state.app.isMobile,
  lang: state => state.app.lang,
  langData: state => state.app.langData,
  theme: state => state.app.theme,
  color: state => state.app.color,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  nickname: state => state.user.name,
  enterpriseName: state => state.user.enterpriseName,
  welcome: state => state.user.welcome,
  roles: state => state.user.roles,
  menus: state => state.user.menus,
  userInfo: state => state.user.info,
  warehouse: state => state.user.warehouse,
  addRouters: state => state.permission.addRouters,
  operations: state => state.permission.operations,
  pageElements: state => state.permission.pageElements,
  currentOperations: state => state.permission.currentOperations,
  currentPageElements: state => state.permission.currentPageElements,
  multiTab: state => state.app.multiTab,
  sideCollapsed: state => state.app.sideCollapsed,
  zoom: state => state.app.zoom,
  hasCurrentOperation: state => ((operation) => {
    let currentOperations = state.permission.currentOperations;
    return Array.isArray(currentOperations) && currentOperations.some(t => t == operation)
  }),

}

export default getters
