Is there a way to freeze status change or provide only few types of status changes in monday.com using code

Hi,
I am trying to build an app for monday.com. In my requirement i need to block a status change on certain condition. And on certain condition i need to show only few sets of status than user can change to.

Eg: if the given list of status is

grooming
in progress
In Review
Done

If certain condition is satisfied i need to show only in review or done. Can you pls suggest a way that we can do it.

This cannot be done currently in code. Statuses have a set of labels that are always visible.

That said there are some things coming in the platform which will allow there to be requirements before a status can change to something. But I am not sure how that is all going to work. So far what I’ve seen has only been that other columns must be filled in with any value. Not conditions on what those values must be.