Teenage Daughter

So I have a teenager (16) who has literally gone downhill since getting with her boyfriend. I trusted his parents were decent people and I allowed my daughter 14 at the time to go to their house for a cookout. I later found out he had gotten her pregnant. So fast forward, we decided it may be easier for her to enroll in online school and be able to graduate early/do schoolwork from home to tend to baby once the time came. So long story short it has been nothing but a shit show, my child’s father is residential but she lives with me full time with little communication with him. She is barely doing her school work at this point and it has been going on since enrolling. I have no control over being able to place her back in brick and mortar. Baby is now 1 and the child’s father is involved when he feels like it but since he has been around he’s undermining mine and my husbands parenting and telling her we’re in the wrong for punishing her to the point she is undermining us, he has had her smoking weed, got her vaping, he’s a drop out and she’s very much headed down the same road. We had asked her for her electronics since she wants to spend her time on the phone or Facebook and TikTok and since he had bought her a tablet she told us we can’t take it because we didn’t buy it (but it would be her lifeline to him and continuing to slack on school) we’ve been battling for about a year and a half now and anything and everything we have said or done has either been criticized by a child who thinks he knows everything or has been a fight with my child because of being influenced not to follow by our rules. I need any suggestions on how to get her to do her schoolwork and properly care for her child and somehow handle her boyfriend :sob: am I in the wrong for trying to take her stuff (that I didn’t pay for) because it’s a distraction since she lives under my roof and is still a minor in the process of getting me a truancy charge?