1 import { c } from 'ttag';
3 import Badge from '@proton/components/components/badge/Badge';
4 import type { IncomingAddressForwarding, OutgoingAddressForwarding } from '@proton/shared/lib/interfaces';
5 import { ForwardingState } from '@proton/shared/lib/interfaces';
8 forward: IncomingAddressForwarding | OutgoingAddressForwarding;
11 const ForwardStatus = ({ forward }: Props) => {
12 if (forward.State === ForwardingState.Pending) {
16 tooltip={c('email_forwarding_2023: Info')
17 .t`Forwardee is invited and needs to accept/reject the invitation or update`}
18 >{c('email_forwarding_2023: Status').t`Pending`}</Badge>
21 if (forward.State === ForwardingState.Active) {
23 <Badge type="success" tooltip={c('email_forwarding_2023: Info').t`Forwarding is active`}>{c(
24 'email_forwarding_2023: Status'
28 if (forward.State === ForwardingState.Outdated) {
30 <Badge type="warning" tooltip={c('email_forwarding_2023: Info').t`Please update your forwarding keys`}>{c(
31 'email_forwarding_2023: Status'
32 ).t`Outdated`}</Badge>
35 if (forward.State === ForwardingState.Paused) {
37 <Badge type="origin" tooltip={c('email_forwarding_2023: Info').t`The forwarding is temporarily paused`}>{c(
38 'email_forwarding_2023: Status'
42 if (forward.State === ForwardingState.Rejected) {
46 tooltip={c('email_forwarding_2023: Info').t`The forwardee rejected the forwarding request`}
47 >{c('email_forwarding_2023: Status').t`Declined`}</Badge>
53 export default ForwardStatus;