import moment from 'moment' import { useCallback } from 'react' import { Col, Row } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import { User } from '../../../../../../types/group-management/user' import Badge from '../../../../shared/components/badge' import ManagedUserDropdownButton from './managed-user-dropdown-button' import Tooltip from '../../../../shared/components/tooltip' import ManagedUserStatus from './managed-user-status' type ManagedUserRowProps = { user: User selectUser: (user: User) => void unselectUser: (user: User) => void selected: boolean openOffboardingModalForUser: (user: User) => void } export default function ManagedUserRow({ user, selectUser, unselectUser, selected, openOffboardingModalForUser, }: ManagedUserRowProps) { const { t } = useTranslation() const handleSelectUser = useCallback( (event, user) => { if (event.target.checked) { selectUser(user) } else { unselectUser(user) } }, [selectUser, unselectUser] ) return (