The provisions dealing with probation set forth in sections
3563 and
3564 are applicable to an order placing a juvenile on probation. If the juvenile violates a condition of probation at any time prior to the expiration or termination of the term of probation, the court may, after a dispositional hearing and after considering any pertinent policy statements promulgated by the Sentencing Commission pursuant to section
994 of title
28, revoke the term of probation and order a term of official detention. The term of official detention authorized upon revocation of probation shall not exceed the terms authorized in section
5037
(c)(2)(A) and (B). The application of sections
5037
(c)(2)(A) and (B) shall be determined based upon the age of the juvenile at the time of the disposition of the revocation proceeding. If a juvenile is over the age of 21 years old at the time of the revocation proceeding, the mandatory revocation provisions of section
3565
(b) are applicable. A disposition of a juvenile who is over the age of 21 years shall be in accordance with the provisions of section
5037
(c)(2), except that in the case of a juvenile who if convicted as an adult would be convicted of a Class A, B, or C felony, no term of official detention may continue beyond the juvenile’s 26th birthday, and in any other case, no term of official detention may continue beyond the juvenile’s 24th birthday. A term of official detention may include a term of juvenile delinquent supervision.