{#snippet renderWebhookHint(webhook)} {@const displayValue = webhook.url || webhook.path}
{at("settings_provider_webhook_url", {}, "Webhook URL")} {webhook.url ? at( adminLocaleKey(webhook.hintI18nKey || "settings_provider_webhook_url_hint"), {}, webhook.hintFallback || "Use this URL in the provider webhook settings." ) : at( "settings_provider_webhook_base_missing", { path: webhook.path }, `Set WEBHOOK_BASE_URL to show the full URL for ${webhook.path}.` )}
{displayValue} copyWebhookUrl(webhook)} > {#if copiedWebhookKey === webhook.key} {at("copied", {}, "Copied")} {:else} {at("copy", {}, "Copy")} {/if}
{/snippet} {#snippet renderGroupedFields(section, group)} {@const fieldGroups = semanticFieldGroups(section, group)} {#if fieldGroups.length === 1 && !fieldGroups[0].titleKey} {#each fieldGroups[0].fields as field} {@render renderField(field)} {/each} {:else}
{#each fieldGroups as fieldGroup}
{#if fieldGroup.titleKey}
{fieldGroupTitle(fieldGroup)} {#if fieldGroupDescription(fieldGroup)} {fieldGroupDescription(fieldGroup)} {/if}
{/if}
{#each fieldGroup.fields as field} {@render renderField(field)} {/each}
{/each}
{/if} {/snippet} {#snippet renderField(field)} {@const revealed = isSecretRevealed(field.key)}
{fieldLabelText(field)} {#if field.secret} {at("settings_badge_secret", {}, "Secret")} {/if} {#if isOverridden(field)} {at("settings_badge_override", {}, "Override")} {/if} {field.key} {#if fieldDescriptionText(field)} {fieldDescriptionText(field)} {/if}
{#if field.type === "bool"}
setBoolField(field, checked)} class="admin-switch-root" > {valueFor(field) ? at("enabled", {}, "Включено") : at("disabled", {}, "Выключено")}
{:else if field.type === "color"} settingsStore.markDirty(field.key, e.currentTarget.value)} /> settingsStore.markDirty(field.key, e.currentTarget.value)} /> {:else if field.type === "icon"} {@const selectedIconName = iconValue(field)} {@const SelectedIcon = iconComponent(selectedIconName)} openIconPicker(field)} > {#if SelectedIcon} {/if} {iconLabel(field)} {#if !iconIsDefault(field)} settingsStore.markDirty(field.key, "")} > {at("clear", {}, "Clear")} {/if} {:else if field.choices && field.choices.length > 0} settingsStore.markDirty(field.key, value)} /> {:else if field.type === "int" || field.type === "float"} settingsStore.markDirty(field.key, e.currentTarget.value)} /> {:else if field.type === "text"}