Remove payments API routing initialization
[ProtonMail-WebClient.git] / packages / components / containers / recovery / getOverallStatus.ts
blobef9e2fe3edc79232399cf11d2cefbf2df382c817
1 import type RecoveryStatus from './RecoveryStatus';
3 interface Props {
4     accountRecoveryStatus: RecoveryStatus;
5     dataRecoveryStatus: RecoveryStatus;
6     isDataRecoveryAvailable: boolean;
9 export const getOverallStatus = ({
10     accountRecoveryStatus,
11     dataRecoveryStatus,
12     isDataRecoveryAvailable,
13 }: Props): RecoveryStatus => {
14     if (accountRecoveryStatus !== 'complete') {
15         return 'incomplete';
16     }
18     if (isDataRecoveryAvailable && dataRecoveryStatus !== 'complete') {
19         return 'intermediate';
20     }
22     return 'complete';