Four clauses decide most of the outcome. The notice period. Any claim the team makes on your database. Any non-solicitation language covering past clients and other agents. And the treatment of deals that are pending when you leave.
Team agreements vary widely. Some claim only the leads the team paid for. Some claim every contact you touched while on the team. Read yours before you say anything to anyone.