A heart attack, also known as a myocardial infarction, is a life-threatening medical emergency that occurs…