{#if editable && onRemove} {/if} {#if previousSets} {/if} {#each mainMetrics as metric (metric)} {/each} {#if editable && hasRpe} {/if} {#if editable} {/if} {#each sets as set, i (i)} {#if editable && onRemove} {/if} {#if previousSets} {/if} {#each mainMetrics as metric (metric)} {@const displayVal = (timedHold && metric === 'duration' && set[metric] != null) ? Math.round(set[metric] * 60) : set[metric]} {/each} {#if editable && hasRpe} {/if} {#if editable} {/if} {#if holdAfterSet === i && holdTotal > 0} {/if} {#if restAfterSet === i && restTotal > 0} {/if} {/each}
{t('set_header', lang)}{t('prev_header', lang)}{timedHold && metric === 'duration' ? 'SEC' : METRIC_LABELS[metric]} {t('rpe', lang)}
{#if sets.length > 1} {/if} {i + 1} {#if previousSets[i]} {formatPrev(previousSets[i])} {:else} N/A {/if} {#if editable} handleInput(i, metric, e)} /> {:else} {displayVal ?? '—'} {/if} @ handleInput(i, 'rpe', e)} /> {#if timedHold && !set.completed} {#if holdAfterSet === i} {:else} {/if} {:else} {/if}