The Western Australian government will soon be hit with a class action on behalf of young people who allegedly suffered mistreatment while in juvenile detention, including excessive solitary confinement, improper living conditions and discrimination.