Two girls and a boy who are alleged to have taken part in a fatal attack on a Sunshine trader who tried to stop them stealing clothes have been granted bail.

Five children fronted court on Friday after it was revealed on Thursday that 60-year-old shopkeeper, Van Viet Truong, had died in hospital after he sustained critical injuries last weekend.

Police say Truong was “set upon” by youths when he tried to help a nearby shop employee caught in a scuffle over allegedly stolen items on Hampshire Street about 2pm last Saturday.

A summary of the alleged offending read in court accused the two girls of stealing clothes from the Diamond Valley Fashion shop when they were confronted by a witness.

“During the struggle for the clothing, a group of four to five circled [the witness] and began to punch him in the head multiple times,” prosecutor Eliza Harrison read from the summary.

Truong, the owner of Hong Hung grocery nearby, then intervened as another bystander also struggled with a girl for a pair of pants.

“All co-accused collectively turned on Truong and attacked him,” the prosecutor alleged. “A male offender, described as five foot eight (172 centimetres), dragged Truong to the ground, causing his head to hit the ground.”

A witness described hearing a “cracking sound” and the group continued to hit Truong when he was on the ground, the police summary claimed.

“[A witness] noticed that Truong was changing colour and was not moving, and had bubble sounds coming from his mouth,” the prosecutor said.

“[Two witnesses] pleaded with the group to stop. However, the attack continued for minutes before one of the group said, ‘Run, run’.”

Two 14-year-old girls and three boys – aged 12, 13 and 15 – were later arrested and initially all charged with affray, violent disorder, intentionally causing serious injury and intentionally causing injury.

Despite a teary plea from the 12-year-old’s mother, all children were remanded in custody on Sunday afternoon as magistrate Robyn Hamilton flagged “within hours or days the victim will die” and charges would be upgraded.

But on Friday, the accused 12-year-old boy appeared in the public part of a courtroom with his parents and had his bail extended until his next appearance on September 11.

After Truong’s death, the charges against the 15-year-old boy were upgraded to include manslaughter. Police also said further investigation had exonerated the 13-year-old boy and that charges would be withdrawn.

The two girls, meanwhile, appeared in a children’s court dock on Friday and were granted bail after Victoria Police conceded they were not an unacceptable risk if released.

Defence lawyer Cristina Tripp initially asked for the court to be closed as the mother of one of girls had “received some messages that amount to harassment”, but magistrate Lesley Fleming rejected her application.

“What would appear to be happening seems to be beyond the control of the court, and may perhaps be better addressed by Victoria Police,” Fleming said.

The magistrate said the accused girl’s age and lack of criminal history were among the factors amounting to a compelling reason to grant bail.

“It’s submitted that the child had a limited role in the alleged offending,” Fleming said. “It is also put in the submission that the child’s role in the offending is unclear.”

The magistrate also released the other accused 14-year-old girl.

“There will be a grant of bail today largely because there is no submission by Victoria Police that the young person posed an unacceptable risk,” Fleming said.

The 14-year-old girl’s lawyer said a condition that she did not contact her co-accused would be “challenging” as the other girl charged was her only friend. However, the magistrate said the condition was “critical” and told the accused teenager to not reach out to her friend on social media.

The 15-year-old boy charged with manslaughter appeared from custody via video link and made no application for bail.

Truong, who had his life support switched off on Wednesday afternoon, has been remembered as a generous family man who was one of the longest-working traders on the shopping strip in the heart of Sunshine.

Premier Ben Carroll and Police Minister Paul Edbrooke met Truong’s family and local businesses on Thursday afternoon.

The premier described his death as senseless.

“He came to Sunshine for a better life, his daughter is a teacher and he has grandchildren,” Carroll said. “He’ll never see them again.”