import { useTranslation } from 'react-i18next'
import { User } from '../../../../../../types/group-management/user'
import MaterialIcon from '@/shared/components/material-icon'
type ManagedUserStatusProps = {
user: User
}
export default function ManagedUserStatus({ user }: ManagedUserStatusProps) {
const { t } = useTranslation()
const managedUserInvite = (
{t('managed')}
)
const managedUserAccepted = (
{t('managed')}
)
const managedUserNotAccepted = (
{t('managed')}
)
if (user.isEntityAdmin) {
return
}
if (user.invite) {
return managedUserInvite
}
return user.enrollment?.managedBy
? managedUserAccepted
: managedUserNotAccepted
}