Minecraft wiki entry for Durability, associated text: Durability gradually decreases while the item is active and held in hand.
If the player has a lit sparkler in their inventory and goes into the water, the sparkler is destroyed immediately regardless of durability.