  We use functional methods to match the Two-Higgs Doublet Model with heavy
scalars in the nondecoupling regime to the appropriate nonlinear effective
field theory, which takes the form of an electroweak chiral Lagrangian (HEFT).
The effective Lagrangian is derived to leading order in the chiral counting.
This includes the loop induced $h\to\gamma\gamma$ and $h\to Z\gamma$ local
terms, which enter at the same chiral order as their counterparts in the
Standard Model. An algorithm is presented that allows us to compute the
coefficient functions to all orders in $h$. Some of the all-orders results are
given in closed form. The parameter regimes for decoupling, nondecoupling and
alignment scenarios in the effective field theory context and some
phenomenological implications are briefly discussed.
