If, following the competency determination hearing provided in § 26-7A-32.7, the court finds that the juvenile is not competent to proceed and that there does not exist a substantial probability that the juvenile will be competent in the foreseeable future, the court shall review the juvenile's condition to determine appropriate placement and upon notice to the state shall dismiss the petition or, if post-adjudication, shall vacate the adjudication order and dismiss the petition.
SDCL 26-7A-32.12