e.key === "Escape" && onClose()} >
e.stopPropagation()} onkeydown={(e) => e.stopPropagation()} role="dialog" aria-labelledby="quick-actions-title" tabindex="-1" >
{#if editingAction || isCreating}
{/if}
{#if isCreating} Create Quick Action {:else if editingAction} Edit Quick Action {:else} Quick Actions {/if}
{#if !editingAction && !isCreating}
New Action
{/if}
{#if editingAction || isCreating}
Name
Icon
{#each availableIcons as icon (icon.id)}
(editIcon = icon.id)} class="p-3 rounded-lg border transition-colors {editIcon === icon.id ? 'bg-[var(--accent-primary)]/10 border-[var(--accent-primary)] text-[var(--accent-primary)]' : 'bg-[var(--bg-secondary)] border-[var(--border-color)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)]/50'}" title={icon.label} >
{@html getIconSvg(icon.id)}
{/each}
Prompt
Cancel
{isCreating ? "Create" : "Save"}
{:else}
{#if $isLoading}
Loading quick actions...
{:else if $actions.length === 0}
No quick actions available
Create your first action
{:else}
{#each $actions as action (action.id)}
handleAction(action)} class="w-full p-4 text-left">
{@html getIconSvg(action.icon)}
{action.name}
{#if action.is_default}
Default
{:else}
Custom
{/if}
{action.prompt}
{ e.stopPropagation(); handleStartEdit(action); }} class="p-1.5 text-[var(--text-tertiary)] hover:text-[var(--text-primary)] bg-[var(--bg-primary)] rounded transition-colors" title="Edit action" >
{#if !action.is_default} {#if showDeleteConfirm === action.id}
{ e.stopPropagation(); handleDelete(action.id); }} class="px-2 py-0.5 text-xs font-medium bg-red-500 text-white rounded hover:bg-red-600 transition-colors" > Delete
{ e.stopPropagation(); showDeleteConfirm = null; }} class="px-2 py-0.5 text-xs font-medium bg-[var(--bg-tertiary)] text-[var(--text-secondary)] rounded hover:bg-[var(--bg-secondary)] transition-colors" > Cancel
{:else}
{ e.stopPropagation(); showDeleteConfirm = action.id; }} class="p-1.5 text-[var(--text-tertiary)] hover:text-red-400 bg-[var(--bg-primary)] rounded transition-colors" title="Delete action" >
{/if} {/if}
{/each}
{/if}
{/if}