Preparing search index...

    Function buildRecipeIngredientsProps

    • Builds props for RecipeIngredients component based on current mode

      Handles mode-specific behavior:

      • readOnly: Displays ingredients as read-only list
      • edit/addManual: Editable ingredients with inline editing
      • addOCR: Add mode with OCR button option

      Parameters

      • stackMode: recipeStateType

        Current recipe screen mode

      • recipeIngredients: (ingredientTableElement | Partial<ingredientTableElement>)[]

        Current ingredients array

      • editIngredients: (oldIngredientId: number, newIngredient: string) => void

        Callback to edit an ingredient

      • addNewIngredient: () => void

        Callback to add a new ingredient

      • removeIngredient: (index: number) => void
      • openModalForField: (field: recipeColumnsNames) => void

        Callback to open OCR modal

      • t: (key: string) => string

        Translation function

      • OptionalhideDropdown: boolean

      Returns RecipeIngredientsProps

      Props object for RecipeIngredients component