import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "~/client/components/ui/form"; import { Textarea } from "~/client/components/ui/textarea"; import { type UseFormReturn } from "react-hook-form"; import type { InternalFormValues } from "./types"; import { Input } from "~/client/components/ui/input"; type AdvancedSectionProps = { form: UseFormReturn; }; type WebhookFieldsProps = { form: UseFormReturn; phase: "pre" | "post"; urlPlaceholder: string; bodyPlaceholder: string; description: string; }; const WebhookFields = ({ form, phase, urlPlaceholder, bodyPlaceholder, description }: WebhookFieldsProps) => { const labelPrefix = phase === "pre" ? "Pre-backup" : "Post-backup"; const fieldPrefix = phase === "pre" ? "preBackupWebhook" : "postBackupWebhook"; return ( <> ( {labelPrefix} webhook {description} The URL origin must be listed in WEBHOOK_ALLOWED_ORIGINS; redirects are not followed. )} /> ( {labelPrefix} webhook headers