Heart failure is a condition in which the heart gradually loses its pumping capacity. It can lead to…