{#if error}
{error}
{/if}
{t('notificationTracker.name')}
form.icon = v} />
{t('notificationTracker.server')}
{#if !isScheduler && colMeta && collections.length > 0}
{t(colMeta.label)}
({ value: col.id, label: col.albumName || col.name, icon: colMeta.icon, desc: colMeta.desc(col), }))} bind:values={form.collection_ids} placeholder={t(colMeta.placeholder)} />
{/if} {#if isScheduler}
{t('notificationTracker.scheduleType')}
form.filters = { ...form.filters, schedule_type: 'interval' }} /> {t('notificationTracker.intervalMode')}
form.filters = { ...form.filters, schedule_type: 'cron' }} /> {t('notificationTracker.cronMode')}
{#if form.filters.schedule_type === 'cron'}
{t('notificationTracker.cronExpression')}
form.filters = { ...form.filters, cron_expression: (e.target as HTMLInputElement).value }} placeholder="0 9 * * 1-5" class="w-full px-3 py-2 border border-[var(--color-border)] rounded-md text-sm bg-[var(--color-background)] font-mono" />
{t('notificationTracker.cronHint')}
{:else}
{t('notificationTracker.scanInterval')}
{/if}
{t('notificationTracker.customVariables')}
{t('notificationTracker.customVariablesHint')}
{#each Object.entries(form.filters.custom_variables || {}) as [key, value]}
updateVariableKey(key, (e.target as HTMLInputElement).value)} placeholder="key" class="w-1/3 px-2 py-1.5 border border-[var(--color-border)] rounded-md text-sm bg-[var(--color-background)] font-mono" />
updateVariableValue(key, (e.target as HTMLInputElement).value)} placeholder="value" class="flex-1 px-2 py-1.5 border border-[var(--color-border)] rounded-md text-sm bg-[var(--color-background)]" />
removeVariable(key)} class="text-[var(--color-error-fg)] hover:opacity-70 text-sm px-1">✕
{/each}
+ {t('notificationTracker.addVariable')}
{:else}
{#if !isWebhook}
{t('notificationTracker.scanInterval')}
{/if}
{t('notificationTracker.batchDuration')}
{/if} {#if trackingConfigItems.length > 0 || templateConfigItems.length > 0}
{#if trackingConfigItems.length > 0}
{t('notificationTracker.defaultTrackingConfig')}
{/if} {#if templateConfigItems.length > 0}
{t('notificationTracker.defaultTemplateConfig')}
{/if}
{/if}
{#if linkCheckLoading}{t('notificationTracker.checkingLinks')}{:else}{editing ? t('common.save') : t('notificationTracker.createTracker')}{/if}