Change WooCommerce quantity minus button when quantity is 0

Hi
When the value of the quantity field is 1, it means that minus button must remove the product from the cart. so why not changing it’s icon to trash bin?
but it seem’s that everything about such things is hardcoded inside bricks and cannot be changed directly. There is no filter/action to change it’s behavior.

NOTE: I use a script that updates the card automatically when pressing plus or minus buttons without needing to press any button.

So how can i achieve that?