When is cosmetic dentistry considered oral surgery?

Cosmetic dentistry is considered oral surgery anytime there's a tooth that is non-restorable and we need to take it out and then replace it.