(a) Immediately after the filing of a petition under Section 841.041, a person subject to a civil commitment proceeding under this chapter is entitled to the assistance of counsel at all stages of the proceeding.
(b) If the person is indigent, the court shall appoint counsel as appropriate under Section 841.005 to assist the person.