text: const { getApproverOrgsFromReq }  = require('./../../infrastructure/Utils');
  
  const getDeactiveAccount = (req, res) => {
    res.render('deactivateAccount/views/deactivate', {
      csrfToken: req.csrfToken(),
      password: '',
      validationMessages: {},
      backLink: true,
      currentPage: 'profile',
    });
  };
  
  const getConfirmDeactiveAccount = (req, res) => {
    res.render('deactivateAccount/views/confirm', {
      csrfToken: req.csrfToken(),
      backLink: true,
      currentPage: 'profile',
    });
  };
  
  const getReviewDeactiveAccount = (req, res) => {
    const approverOrgs = getApproverOrgsFromReq(req)
    const singleApproverOrgs = approverOrgs.filter(i => i.approvers.length === 1)
    singleApproverOrgs.forEach(item => {
      item.registeredUsers = item.approvers.length + item.endUsers.length
    });
    res.render('deactivateAccount/views/review', {
      singleApproverOrgs,
      backLink: true,
      currentPage: 'profile',
    });
  };
  
  module.exports = { getDeactiveAccount, getConfirmDeactiveAccount, getReviewDeactiveAccount };
  