import { AlertDialog, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@/shared/common/ui/alert-dialog"; import { Button } from "@/shared/common/ui/button"; import { TeamMemberDto } from "@/user-management/dto/teamMember/teamMember"; import { useEmployeePositions } from "@/user-management/hooks/useEmployeePostions"; import { Loader2 } from "lucide-react"; interface DeleteTeamMemberDialogProps { isOpen: boolean; onClose: () => void; departmentId: string; departmentName: string; teamMemberId: string; teamMemberName: string; } export const DeleteTeamMemberDialog = ({ departmentId, departmentName, isOpen, onClose, teamMemberId, teamMemberName, }: DeleteTeamMemberDialogProps) => { if (!teamMemberId) return null; const { setInactive, isDeActivatingUser } = useEmployeePositions(); const payload = { employeeId: teamMemberId, positionId: departmentId, }; const onDelete = () => { setInactive({ payload, successCallback: onClose, }); }; return ( Remove team member from this position? Are you sure you want to remove {teamMemberName} from this position? They will be marked as inactive for this position. This action can be reversed by reassigning them to the position later. Cancel ); };