Updates an existing ingredient at the specified index. If the ingredient name changes, triggers validation workflow for fuzzy matching. If only quantity/unit changes, updates the ingredient in place.
Adds an empty ingredient row to the recipe form
Adds a validated ingredient to the recipe or merges its quantity if the same ingredient exists. If the ingredient exists with the same unit, quantities are summed. If units differ, the new ingredient replaces the existing one.
Replaces ALL FormIngredients with matching name with the validated database ingredient. Preserves each ingredient's own quantity/unit/note while applying database metadata. Used by scraper validation when the same ingredient appears multiple times.
Removes the ingredient at the given index from the recipe form
Return value of the useRecipeIngredients hook.