import Dialog from "~/components/Dialog"; import type { Machine, User } from "~/types"; interface DeleteProps { user: User; machines: Machine[]; isOpen: boolean; setIsOpen: (isOpen: boolean) => void; } export default function DeleteUser({ user, machines, isOpen, setIsOpen }: DeleteProps) { const name = user.name || user.displayName; return ( 0 ? "unactionable" : "normal"}> Delete {name}? {machines.length > 0 ? ( Users cannot be deleted if they have machines. Please delete or re-assign their machines to other users before proceeding. ) : ( Deleted users cannot be recovered. {user.provider === "oidc" && (

Since this user is authenticated via an external provider, they will be recreated if they sign in again.

)}
)}
); }