+
+ {#if conflicts.length > 0}
+
+ ⚠
+ Cannot apply — {conflicts.length} conflict{conflicts.length > 1 ? 's' : ''} found
+
+
+ {#each conflicts as c}
+
+ {c.category}
+ "{c.name}"
+ {c.reason}
+
+ {/each}
+
+
+ {:else if !hasChanges}
+
All items in the template are already present — nothing to apply.
+
+ {:else}
+ {#each preview as section}
+ {@const visible = section.items.filter(i => i.action !== 'skip')}
+ {@const skipped = section.items.filter(i => i.action === 'skip').length}
+ {#if visible.length > 0 || skipped > 0}
+
+
{section.category}
+ {#each visible as item}
+
+
+ {item.action === 'add' ? 'new' : 'merge'}
+
+
+
{item.name}
+ {#if item.detail}
+
{item.detail}
+ {/if}
+ {#if item.additions && item.additions.length > 0}
+
+ {#each item.additions as addition}
+ + {addition}
+ {/each}
+
+ {/if}
+
+
+ {/each}
+ {#if skipped > 0}
+
{skipped} already present, unchanged
+ {/if}
+
+ {/if}
+ {/each}
+ {/if}
+
+