This is decided on a case-by-case basis but it is widely accepted that children of 12 and above are considered old enough and mature enough to make informed reasonably informed decisions about what's in their best interests. This may be different if there is a suspicion the child has been exposed to alienation.