Disable click on alert controller

Hii ,
I wanna disable click on alert controller when some condition are true
how to do it ?

https://ionicframework.com/docs/api/components/alert/AlertController/ :

Alert Buttons

In the array of buttons, each button includes properties for its text, and optionally a handler. If a handler returns false then the alert will not automatically be dismissed when the button is clicked. All buttons will show up in the order they have been added to the buttons array, from left to right. Note: The right most button (the last one in the array) is the main button.