Spain considers impact of Britain leaving EU