Went to look at a new car and was told it was in the shop

How do you handle a new car that has already been in the body shop? They say it was just some tailgate damage but how would you go about navigating this? Would this show up on a carfax, do I need to do a PPI on it, .. going to double check the mileage to make sure it’s not been used as a loaner or anything like that.

I expect them to try and say the price was discounted because of the damage but I can see the price history on it goes back 2 months with regular discounts ever 2-3 weeks.

Price seems decent right now ( haven’t seen an OTD yet ) so I’m looking for strategies for using this information to my advantage.