Here's how bad off Amanda Bynes is ... it looks like she could be in a mental health facility for a year and a half.
Amanda's lawyer was in a NYC court today ... in connection with the case where Amanda allegedly threw a bong out the window of her apartment.
Her lawyer, Gerald Shargel, asked for a postponement for up to 18 months while she got psychiatric treatment.
Sources tell TMZ ... the likelihood is ... the case will be plea bargained ... there are major weaknesses in the prosecution's case. Translation -- the case could possibly be dropped altogether.