The county prosecuting attorney shall be a party to all juvenile court proceedings involving juvenile offenders or alleged juvenile offenders.
The prosecuting attorney may, after giving appropriate notice to the juvenile court, decline to represent the state of Washington in juvenile court matters except felonies unless requested by the court on an individual basis to represent the state at an adjudicatory hearing in which case he or she shall participate. When the prosecutor declines to represent the state, then such function may be performed by the juvenile court probation counselor authorized by the court or local court rule to serve as the prosecuting authority.
If the prosecuting attorney elects not to participate, the prosecuting attorney shall file with the county clerk each year by the first Monday in July notice of intent not to participate. In a county wherein the prosecuting attorney has elected not to participate in juvenile court, he or she shall not thereafter until the next filing date participate in juvenile court proceedings unless so requested by the court on an individual basis, in which case the prosecuting attorney shall participate.