Quantum phase transitions in Bose–Einstein condensates from a Bethe ansatz perspective