Leaving dog in the car. Was I wrong to leave a dog in the car alone

The other day me and my SO were driving to the store we had our little Yorkie in the car because we just brought her to get groomed. We both decided to get out of the car at the store to shop very quickly. It was 97 degrees out. So we left the car running with the air conditioner on and brought the beeper and locked the car.

When we got out there was a lady screaming at us about leaving a dog in the car alone. And she called the police. We told her that the car is running and the air conditioner is on it’s actually way cooler in there then it is outside or in the store. She continued to yell and said the police are on their way. We just got in the car and tried to leave but she was standing behind the car so we couldn’t. We were in a truck so we just drive over the curb and left. So do you think we were wrong to leave a dog in a car running with the air conditioner on for 10 minutes.