1 import { c } from 'ttag';
3 import SettingsParagraph from '@proton/components/containers/account/SettingsParagraph';
4 import SettingsSectionWide from '@proton/components/containers/account/SettingsSectionWide';
5 import UpgradeBanner from '@proton/components/containers/account/UpgradeBanner';
14 } from '@proton/shared/lib/constants';
15 import { getUpsellRef } from '@proton/shared/lib/helpers/upsell';
16 import { getKnowledgeBaseUrl } from '@proton/shared/lib/helpers/url';
18 import { useUser } from '../../hooks';
20 const CatchAllSection = () => {
21 const [{ isAdmin, isSubUser }] = useUser();
22 const hasPermission = isAdmin && !isSubUser;
24 const plus = PLAN_NAMES[PLANS.MAIL];
25 const bundle = PLAN_NAMES[PLANS.BUNDLE];
27 const upsellRef = getUpsellRef({
28 app: APP_UPSELL_REF_PATH.MAIL_UPSELL_REF_PATH,
29 component: UPSELL_COMPONENT.BANNER,
30 feature: MAIL_UPSELL_PATHS.CATCH_ALL,
36 <SettingsParagraph learnMoreUrl={getKnowledgeBaseUrl('/catch-all')}>
38 .t`If you have a custom domain with ${MAIL_APP_NAME}, you can set a catch-all email address to receive messages sent to your domain but to an invalid email address (e.g., because of typos).`}
41 <UpgradeBanner upsellPath={upsellRef}>
42 {c('new_plans: upgrade').t`Included with ${plus}, ${bundle}, and ${BRAND_NAME} for Business.`}
45 </SettingsSectionWide>
49 export default CatchAllSection;