Query prev & next buttons

Hi all,

Is there a way of hiding the prev button for a query if it’s the first page and there’s no previous page, and respectively hide next button if it’s the last page?
Looking through the conditions element and can’t see anything there.

Thank you.