import MaterialIcon from '@/shared/components/material-icon' import { Trans, useTranslation } from 'react-i18next' import { GroupSSOLinkingStatus } from '../../../../../types/subscription/sso' import getMeta from '../../../utils/meta' import OLButton from '@/features/ui/components/ol/ol-button' function SecuritySection() { const { t } = useTranslation() const memberOfSSOEnabledGroups = getMeta('ol-memberOfSSOEnabledGroups') || [] return ( <> {memberOfSSOEnabledGroups.length > 0 ? ( <>

{t('security')}

{memberOfSSOEnabledGroups.map( ({ groupId, linked, groupName, adminEmail, }: GroupSSOLinkingStatus) => (
{t('single_sign_on_sso')}{' '} {linked ? ( {t('active')} ) : ( {t('ready_to_set_up')} )}
{linked ? ( groupName ? ( ]} values={{ groupName }} shouldUnescape tOptions={{ interpolation: { escapeValue: true } }} /> ) : ( ]} values={{ adminEmail }} shouldUnescape tOptions={{ interpolation: { escapeValue: true } }} /> ) ) : groupName ? ( , ]} values={{ groupName, buttonText: t('set_up_sso') }} shouldUnescape tOptions={{ interpolation: { escapeValue: true } }} /> ) : ( , ]} values={{ adminEmail, buttonText: t('set_up_sso') }} shouldUnescape tOptions={{ interpolation: { escapeValue: true } }} /> )}
{linked ? null : (
{t('set_up_sso')}
)}
) )}
) : null} ) } export default SecuritySection