import { ExternalLink, MoreHorizontal, Edit2, UserX, Lock, SendIcon } from "lucide-react"; import { useSession } from "next-auth/react"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { ButtonGroup, Tooltip, Button, Dropdown, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownItem, DropdownMenuSeparator, showToast, } from "@calcom/ui"; import type { Action } from "./UserListTable"; import type { User } from "./UserListTable"; export function TableActions({ user, permissionsForUser, dispatch, domain, }: { user: User; dispatch: React.Dispatch; domain: string; permissionsForUser: { canEdit: boolean; canRemove: boolean; canImpersonate: boolean; canResendInvitation: boolean; }; }) { const { t, i18n } = useLocale(); const { data: session } = useSession(); const resendInvitationMutation = trpc.viewer.teams.resendInvitation.useMutation({ onSuccess: () => { showToast(t("invitation_resent"), "success"); }, onError: (error) => { showToast(error.message, "error"); }, }); const usersProfileUrl = `${domain}/${user.username}`; if (!session?.user.org?.id) return null; const orgId = session?.user?.org?.id; return ( <>