If you find a picture, click it, if not, finish the macro

Hi

I just started. I want to write a macro in UI.vision. The macro will run in desktop mode
As a script;
"Search for “A.png” image on the screen, if you find it, click on the “A1.png” image, if there is no “A.png”, continue and the macro will end. "

How do I write? Do you have any suggestions and can you share sample code?

Best Regard,

Please see If {picture} then {do this}