Dear Brother/Sister. Assalaamu alaykum. I came across some articles in which it says that a man can give the right of divorce to his wife. Does that mean that if a man tells his wife during a fight: if you want to leave, then go, and, on the spot, since the wife is angry, she says, "Yes, I am leaving you," this counts as a divorce? Thank you for explaining.
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
Divorce is in the hands of the husband, but he has the right to put the matter of divorce in the hands of his wife.
There are explicit words of deputizing (in divorce), and there metaphors to express this.
The Kuwaiti Fiqh Encyclopedia reads, "The majority of the scholars divided the words/expressions of authorization of divorce to explicit and metaphorical. The explicit expression, according to them, is what includes the word divorce, such as ‘divorce yourself if you wish’, and the metaphorical is what is expressed with words other than divorce, such as, ‘choose for yourself’ and ‘the matter is in your hands.’"
The expression of the husband that you mentioned in the question is not explicit in authorizing his wife to divorce herself; and her expression is also not explicit in choosing divorce. Therefore, if he had intended to authorize her to divorce herself (if he had intended to put the matter of divorce in her hands), and she had intended to choose divorce, then divorce is effective, otherwise, it is not.
Allah knows best.
You can search for fatwa through many choices