'use strict';

require('../stores/index.js');
var userInfo = require('../stores/userInfo.js');

function getpower(value) {
  const stores = userInfo.useUserInfo();
  const matched = stores.userInfos.powers.find((v) => v.key === value);
  if (matched) return matched;
  return { authType: 0, power: 1, orgIds: null };
}
function powerAuthDel(value) {
  const stores = userInfo.useUserInfo();
  const matched = stores.userInfos.powers.find((v) => v.key === value);
  if (matched) {
    return true;
  }
  return false;
}

exports.getpower = getpower;
exports.powerAuthDel = powerAuthDel;
