MAKING A PRODUCT'S ADD TO CART BUTTON "GREYED OUT/UNCLICKABLE" IF ALREADY IN CART.

I have 3 products in a product gallery, products 1, 2, & 3.
The products all have an “Add to Cart” button if that matters.

Customer clicks on product 1, fills it out, adds to cart.
Is there a way to code the add to cart button for product 1 to now be greyed out/unclickable or display that it’s already in cart?

Please observe the community guidelines and DO NOT USE ALL CAPS.