Amber Portwood had her first court date following her July 5 arrest, and the Teen Mom OG star did not get good news.

Amber— who was charged with three felonies on Tuesday, including “Criminal Recklessness Committed with a Deadly Weapon”—has hired an attorney to help her with her case. The attorney appeared in court alongside Amber on Wednesday morning, where they learned that the protective order against Amber that was filed on Tuesday has been granted.

Amber has been ordered to have no contact with her boyfriend Andrew Glennon (who claims Amber came at him with a machete and allegedly hit him with a shoe and her hands on the night of July 5). She is also not allowed to see James, the son she shares with Andrew.

Court docs obtained by The Ashley show that Amber was served with the no contact order by a court bailiff at 8:30 a.m. on Wednesday.

TMZ attempted to speak to Amber as she entered the courthouse on Wednesday, but she refused to make any comment. She was accompanied by her mother, Tonya Portwood, as well as her other baby daddy Gary Shirley and his wife Kristina. Her MTV producer David Birch was also in attendance.

(Amber was not filming at the time of the alleged incident on July 5. The ‘OG’ cast had technically wrapped filming for the next season. However, when something this major happens to one of the ‘Teen Mom’ girls, their producers high-tail it to them to capture the moment.)

It appears that Andrew is still living at the home he once shared with Amber, as Amber was heard telling her mother that she left her cars at the house so “he can have them for James.”

Andrew also made an appearance at the courthouse on Wednesday, although he did not arrive with Amber & Co. When the TMZ reporter asked him how he was doing, Andrew muttered, “I’ve seen better days.”

On Tuesday, Andrew filed papers in the Marion County juvenile court to request an emergency custody hearing, as well as a petition to establish paternity for James.

The Department of Child Services (which has launched its own investigation into the incident) interviewed Andrew on Monday. According to court documents, Andrew stated that Amber is “currently unable to provide a safe, stable, and secure environment for James on an ongoing basis due to her frequent refusal and/or failure to take medicines prescribed to treat her mental-health conditions, among other concerns.”

Andrew has yet to make any sort of public statement; however his account to police that was written up in the Affidavit for Probable Cause, which The Ashley obtained on Tuesday, painted a terrifying picture of what allegedly went down the night of July 5 inside Amber and Andrew’s Indiana home.

“She keeps a machete with a sheath on it,” the affidavit stated. “Amber picked up the machete, took the sheath off and looked at Andrew with a look so as she was moving around the bed, he took [the baby] into the office and closed the door and put his foot on it to hold it closed.

“Andrew said Amber kicked the door allowing the top to pop open from the kick but he kept his foot at the bottom…Amber then used the machete and began using it to put slashes on the door.”

An emergency custody hearing is scheduled for later today. A pretrial conference in regard to Amber’s criminal charges has been set for July 26.

The Ashley will update this story when she has more info…

(Photo: MTV)