import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "~/client/components/ui/form"; import { Input } from "~/client/components/ui/input"; import type { UseFormReturn } from "react-hook-form"; import type { InternalFormValues } from "./types"; type RetentionSectionProps = { form: UseFormReturn; }; export const RetentionSection = ({ form }: RetentionSectionProps) => { return ( <> ( Keep last N snapshots field.onChange(v.target.value === "" ? undefined : Number(v.target.value))} /> Keep the N most recent snapshots. )} /> ( Keep hourly field.onChange(v.target.value === "" ? undefined : Number(v.target.value))} /> Keep the last N hourly snapshots. )} /> ( Keep daily field.onChange(v.target.value === "" ? undefined : Number(v.target.value))} /> Keep the last N daily snapshots. )} /> ( Keep weekly field.onChange(v.target.value === "" ? undefined : Number(v.target.value))} /> Keep the last N weekly snapshots. )} /> ( Keep monthly field.onChange(v.target.value === "" ? undefined : Number(v.target.value))} /> Keep the last N monthly snapshots. )} /> ( Keep yearly field.onChange(v.target.value === "" ? undefined : Number(v.target.value))} /> Keep the last N yearly snapshots. )} /> ); };