import { ActionIcon, Badge, Box, Group, Title, Text, Tooltip, Button } from '@mantine/core'; import { openRoleChangeModal } from '~/components/Manage/User/change-user-role.modal'; import { IconUserDown, IconUserUp } from '@tabler/icons-react'; import { useTranslation } from 'next-i18next'; import { useSession } from 'next-auth/react'; export const ManageUserRoles = ({ user }: { user: { image: string | null; id: string; name: string | null; password: string | null; email: string | null; emailVerified: Date | null; salt: string | null; isAdmin: boolean; isOwner: boolean; } }) => { const { t } = useTranslation(['manage/users/edit', 'manage/users']); const { data: sessionData } = useSession(); return ( {t('sections.roles.title')} {t('sections.roles.currentRole')} {user.isOwner ? ({t('sections.roles.badges.owner')}) : user.isAdmin ? ( {t('sections.roles.badges.admin')}) : ({t('sections.roles.badges.normal')})} {user.isAdmin ? ( ) : ( )} ); };