Trade-In question

I’m looking at trading in a car when I buy a new vehicle in the next few months. The car is currently worth around $22,500 as a trade-in with a loan balance of $10,500. I have the cash to pay-off the loan right now.

Is it better to trade in the car with the loan still attached to it or pay off the loan before buying the new car?

Thanks for the help!