1 import { c } from 'ttag';
3 import { useOrganization } from '@proton/account/organization/hooks';
4 import { Button } from '@proton/atoms';
5 import useSettingsLink from '@proton/components/components/link/useSettingsLink';
6 import { isMobile } from '@proton/shared/lib/helpers/browser';
7 import { getOrganizationDenomination } from '@proton/shared/lib/organization/helper';
8 import onboardingFamilyPlan from '@proton/styles/assets/img/onboarding/familyPlan.svg';
9 import onboardingOrganization from '@proton/styles/assets/img/onboarding/organization.svg';
10 import clsx from '@proton/utils/clsx';
12 import OnboardingContent from './OnboardingContent';
13 import OnboardingStep from './OnboardingStep';
14 import type { OnboardingStepRenderCallback } from './interface';
16 interface Props extends OnboardingStepRenderCallback {}
18 const OnboardingSetupOrganization = (props: Props) => {
19 const [organization] = useOrganization();
20 const hasFamilyOrg = getOrganizationDenomination(organization) === 'familyGroup';
21 const goToSettings = useSettingsLink();
23 const title = hasFamilyOrg
24 ? c('familyOffer_2023:Onboarding Proton').t`Set up your family account`
25 : c('Onboarding Proton').t`Set up your organization`;
27 const description = hasFamilyOrg
28 ? c('familyOffer_2023:Onboarding Proton').t`Configure your family account and invite users`
29 : c('Onboarding Proton')
30 .t`Configure your organization, link your domain name, and create accounts to ensure all members of your organization are protected.`;
32 const imgAlt = hasFamilyOrg
33 ? c('familyOffer_2023:Onboarding Proton').t`Set up your family`
34 : c('Onboarding Proton').t`Set up your organization`;
36 const img = hasFamilyOrg ? onboardingFamilyPlan : onboardingOrganization;
40 <OnboardingContent title={title} description={description} {...props}>
41 <div className={clsx('text-center', isMobile() ? 'pt-4' : 'pt-12')}>
45 className="w-full mb-2 max-w-custon"
47 '--max-w-custon': isMobile() ? '15em' : '20em',
55 goToSettings('/multi-user-support', undefined, true);
59 {c('Action').t`Start setup`}
64 <footer className="flex flex-nowrap">
65 <Button size="large" fullWidth onClick={props.onNext}>
74 export default OnboardingSetupOrganization;