{#if data.ingredients}
{#if data.portions}

{labels.portions}

{@html convertFloatsToFractions(multiplyFirstAndSecondNumbers(data.portions, multiplier))} {/if}

{labels.adjustAmount}

{#each Array.from(currentParams.entries()) as [key, value]} {#if key !== 'multiplier'} {/if} {/each} {#each multiplierOptions as opt} {/each} o.value === multiplier) ? multiplier : ''} oninput={handleCustomInput} />

{labels.ingredients}

{#each flattenedIngredients as list, listIndex} {#if list.name} {#if list.isReference}

{@html list.name}

{:else}

{@html list.name}

{/if} {/if} {#if list.list}
{#each list.list as item, ingredientIndex}
{@html adjust_amount(item.amount, multiplier)} {item.unit}
{@html item.name.replace("{{multiplier}}", isNaN(parseFloat(item.amount)) ? multiplier : multiplier * parseFloat(item.amount))} {#if item.name.toLowerCase() === "frischhefe" || item.name.toLowerCase() === "trockenhefe" || item.name.toLowerCase() === "fresh yeast" || item.name.toLowerCase() === "dry yeast"} {@const yeastId = yeastIds[`${listIndex}-${ingredientIndex}`] ?? 0} {/if}
{/each}
{/if} {/each}
{/if}