Leanne Wood says she will step down if she does not become first minister after the next election.