I'm an undergrad student and I got together with 2 people to write a research article (lit review) for publication. We divided the project in 3 sections and each did our part. When it was time to submit it, I noticed they completely edited my sections and removed/added new things to it. They said what i wrote wasn't good and my writing had plagiarism, therefore I am not considered a first author (along with them) anymore. They didn't even tell me they were not satisfied with my writing before they edited it.
After days of arguing, the journal we were planning to submit it to emailed us and told us that if we don't come to an agreement soon, they won't even publish our paper. My "teammates" agreed to have me as first author, but without including any of my edits.
My question is, is it unethical for me to accept first authorship now that a lot of my original content is deleted from the paper?