{ if ($lessonVideoUpload.isUploading) return; $lessonVideoUpload.isModalOpen = false; triggerAutoSave(); }} /> { if ($lessonDocUpload.isUploading) return; $lessonDocUpload.isModalOpen = false; $lessonDocUpload.error = null; triggerAutoSave(); }} />
{#if mode === MODES.view && $globalStore.isStudent} {/if} {#if mode === MODES.edit && window.innerWidth >= 1024} (isVersionDrawerOpen = true)}> {/if}
{#if mode === MODES.edit} {:else} {/if}
{#snippet child()}
{#if $globalStore.isStudent && lessonApi.lesson && !isLessonUnlocked} {:else if mode === MODES.edit} { setTabQueryParam(e); }} > {#each tabs as tab} {#if tab.icon} {/if} {$t(tab.label)} {#if typeof tab.badgeValue === 'number' && tab.badgeValue > 0} {/if} {/each} {:else if lessonApi.lesson && !isMaterialsEmpty} {#key lessonId}
{#each viewModeComponents as Component} {/each} {#if $currentOrg.customization?.apps?.comments}
{/if}
{/key} {:else} {/if}
{/snippet}
{#if isVersionDrawerOpen && window.innerWidth >= 1024} (isVersionDrawerOpen = false)} on:restore={refetchDataAfterVersionRestore} /> {/if}