{#if edit}
{name}
/{command}
{#if !disabled}
(showAccessControlModal = true)} >
{$i18n.t('Access')}
(showEditModal = true)} > {$i18n.t('Edit')}
{:else}
{$i18n.t('Read Only')}
{/if}
{@render historySection()}
{$i18n.t('Prompt Content')}
{#if selectedHistoryEntry}
{selectedHistoryEntry.id.slice(0, 7)}
{/if}
{#if selectedHistoryEntry && !disabled}
{#if selectedHistoryEntry.id === prompt?.version_id}
{:else}
setAsProduction(selectedHistoryEntry)} > {$i18n.t('Set as Production')}
{/if}
handleDeleteHistory(selectedHistoryEntry.id)} onClose={() => {}} />
{/if}
{#if contentCopied}
{:else}
{/if}
{selectedHistoryEntry?.snapshot ?.content || content}
{@render historySection()}
{:else}
(showAccessControlModal = true)} >
{$i18n.t('Access')}
/
{$i18n.t('Prompt Content')}
ⓘ {$i18n.t('Use')}
{'{{'}{$i18n.t('variable')}{'}}'}
{$i18n.t('for placeholders')}
{$i18n.t('Save & Create')}
{#if loading}
{/if}
{/if} {#snippet historySection()}
{$i18n.t('History')}
{#if historyLoading}
{/if}
{#if history.length > 0}
{#each history as entry, index}
(selectedHistoryEntry = entry)} >
{entry.commit_message || $i18n.t('Update')}
{#if entry.id === prompt?.version_id}
{/if}
{#if entry.user}
(e.target.src = '/user.png')} />
{entry.user.name}
•
{/if}
{renderDate(entry.created_at)}
{/each} {#if historyHasMore && historyLoading}
{/if}
{:else if !historyLoading}
{$i18n.t('No history available')}
{/if}
{/snippet}