- {#each [["txt", "Plain Text"], ["md", "Markdown"], ["csv", "CSV"], ["html", "HTML"], ["srt", "SRT Subtitles"], ["vtt", "WebVTT"]] as [fmt, label]}
+ class="btn-md rounded-lg text-text-secondary hover:bg-hover hover:text-text flex-shrink-0 whitespace-nowrap"
+ onclick={() => { showTemplateMenu = !showTemplateMenu; showExportMenu = false; }}
+ >Template
+ {#if showTemplateMenu}
+
+ {#each templates as template}
+ class="w-full text-left btn-md text-text-secondary hover:bg-hover hover:text-text
+ {activeTemplate === template.name ? 'text-accent' : ''}"
+ onclick={() => applyTemplate(template)}
+ >{template.name}
{/each}
{/if}
+ class="btn-md rounded-lg text-text-secondary hover:bg-hover hover:text-text whitespace-nowrap"
+ onclick={() => { showExportMenu = !showExportMenu; showTemplateMenu = false; }}
+ >Export
+ {#if showExportMenu}
+
+ {#each [["txt", "Plain Text"], ["md", "Markdown"], ["csv", "CSV"], ["html", "HTML"], ["srt", "SRT Subtitles"], ["vtt", "WebVTT"]] as [fmt, label]}
+
+ {/each}
+
+ {/if}