Courts typically decide how to detain a juvenile based on factors such as the seriousness of the alleged offense, the juvenile’s history, and community safety. The decision whether to proceed informally or formally will be made after the court considers additional information such as the age of the juvenile, their history of juvenile delinquency, their amenability to supervision and treatment, and the community's need for protection from the alleged offense.