They think, therefore they spread: plants can make complex conditional decisions