I need advice!! Long story lol

I and my ex now, we have been together for 5 years. We had arguements before but recently he has been more aggressive towards me, pushing me trying to get to my phone. Smacking me in the face so this time, a huge argument happend.. he blew smoke in my face, putting me down about my anxiety and all this. I had enough I was maaaaad. Since he also poured coffee all over me. I was screaming, he was video recording it all after the coffee incident..

I threw a shoe and a water bottle.. and cracked the corner of his phone ( mind you he did it to mine first) ANYWAY 😒😒.... he went and next thing I know the cops were there telling me I AM ARRESTED. So that happend. I need advice on what to do, court is coming up and I'm scared shitless ...I don't want to get arrested AGAIN and put in jail...what will happen? This is my first offence, Assault with weapon and Mischeif..