import { disableActiveAuthUser } from '../../../utils/constants';

export default {
  isShowPageLoginModal: (state, getters, global) => {
    const { isLogin } = global.getIn(['userInfo'], {});
    const { loginType } = global;
    const { accessMode } = state;
    if (!isLogin &&
      (accessMode === 'login' || accessMode === 'realName') && !(disableActiveAuthUser && (loginType === 'user'))
    ) {
      return true;
    }
    return false;
  },
};
