import moment from 'moment' import { type Dispatch, type SetStateAction } from 'react' import { useTranslation } from 'react-i18next' import { User } from '../../../../../../types/group-management/user' import Badge from '../../../../shared/components/badge' import Tooltip from '../../../../shared/components/tooltip' import type { GroupUserAlert } from '../../utils/types' import ManagedUserStatus from './managed-user-status' import SSOStatus from './sso-status' import DropdownButton from './dropdown-button' import SelectUserCheckbox from './select-user-checkbox' import getMeta from '@/utils/meta' type ManagedUserRowProps = { user: User openOffboardingModalForUser: (user: User) => void openUnlinkUserModal: (user: User) => void groupId: string setGroupUserAlert: Dispatch> } export default function MemberRow({ user, openOffboardingModalForUser, openUnlinkUserModal, setGroupUserAlert, groupId, }: ManagedUserRowProps) { const { t } = useTranslation() const managedUsersActive = getMeta('ol-managedUsersActive') const groupSSOActive = getMeta('ol-groupSSOActive') return ( {user.email} {user.invite ? (   {t('pending_invite')} ) : ( '' )} {user.isEntityAdmin && (