(a) In delinquency and child in need of supervision cases, a child and his or her parent, legal guardian, or legal custodian shall be advised by the juvenile court or its representative at intake that the child has the right to be represented at all stages of the proceedings by a child's attorney retained by them or, if they are unable to afford a child's attorney, by a child's attorney appointed by the juvenile court.
(b) If a child's attorney is not retained by the child or a party in a juvenile court proceeding in which there is a reasonable likelihood such may result in a placement in an institution in which the freedom of the child is curtailed, a child's attorney shall be appointed to defend the child.
(c) In delinquency and child in need of supervision proceedings, a juvenile court may appoint a guardian ad litem in addition to the child's attorney described in this section.
(d) The juvenile court may appoint counsel in any case when it deems such in the interests of justice.