(a) Right to Counsel; Public Defender; Assignment of Counsel. In all matters the parties shall have the right to be represented by counsel. In family matters the court shall advise the juvenile and the juvenile’s parents, guardian, or custodian of their right to retain counsel and, if counsel is not otherwise provided for the family and if the matter may result in the institutional commitment or other consequence of magnitude to any family member, or if any family member is constitutionally or by law entitled to counsel, the court shall refer the family member to the Office of the Public Defender, if appropriate, or assign other counsel to represent the juvenile or family member. The court may, depending upon the financial circumstances of the parents, guardian or custodian, order them to pay the fee of assigned counsel in such amount as it fixes. The court shall also assign counsel to represent indigent in family actions where a party is by constitution, state or federal, or by law entitled to counsel and there is no publicly-funded source of representation available.