{getTranslation('course', currentLocale)} {course?.toUpperCase()} - {courseStats.modules?.length ?? 0} {getTranslation('modules', currentLocale)}

{getLocalizedTitle(courseStats.courseTitle)}

{#if loading}

{getTranslation('loading', currentLocale)}

{:else if error}

{error.message}

{:else if courseStats?.modules}
{getTranslation('courseWebsite', currentLocale)}
{@const start = currentPage * perPage} {@const visibleModules = filteredModules.slice(start, start + perPage)}
{#each visibleModules as module} {/each}
{getTranslation('back', currentLocale)} {currentPage + 1} / {Math.ceil(filteredModules.length / perPage)} = filteredModules.length} class="rounded border px-4 py-2 transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100" > {getTranslation('next', currentLocale)}
{/if}