Can you disable other discounts from being added?

Hello!

So I have a bit of an interesting use case. We are currently creating a checkout extension, that will renders a text input, that will hit an external API and then render options to the user. When the user clicks on said option, it will add a discount code to cart.

This is where my question comes in. My PM has asked that once that discount code has been applied, that we don’t allow any other discount codes. It seems possible to check the subscription codes manually via the
const currentDiscountCodes = useDiscountCodes();
But it seems like a bad experience. A user will add a code, it will show up, and then disappear.

Is there a more elegant way to stop codes from activating once that code has been input?

Cheers