import '../stores/index.mjs';
import { useUserInfo } from '../stores/userInfo.mjs';

function getpower(value) {
  const stores = 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 = useUserInfo();
  const matched = stores.userInfos.powers.find((v) => v.key === value);
  if (matched) {
    return true;
  }
  return false;
}

export { getpower, powerAuthDel };
