import { useTranslation } from 'react-i18next'
import getMeta from '@/utils/meta'
import { User } from '../../../../../../types/group-management/user'
import MaterialIcon from '@/shared/components/material-icon'
type SSOStatusProps = {
user: User
}
export default function SSOStatus({ user }: SSOStatusProps) {
const groupId = getMeta('ol-groupId')
if (user.invite) {
return
}
const linkedSSO = user.enrollment?.sso?.some(sso => sso.groupId === groupId)
return linkedSSO ? :
}
function PendingInvite() {
const { t } = useTranslation()
return (
{t('sso')}
)
}
function SSOLinked() {
const { t } = useTranslation()
return (
{t('sso')}
)
}
function SSOUnlinked() {
const { t } = useTranslation()
return (
{t('sso')}
)
}