"use client"; import { useActionState } from "react"; import type { SiteSettings } from "yt-dlp-transcript-common/lib/settings"; import type { DigestAppDescriptor } from "yt-dlp-transcript-common/lib/digestApps"; import { Field, SeededSelect } from "../../../components/forms/Field"; import { seedChecked } from "../../../lib/formState"; import { saveAttributionSettingsAction } from "../../settingsActions"; import type { SaveResult } from "../../../settings/actions"; // The `attribution` block of settings.json — ONE block behind TWO operations, // so this same form is drawn on /operations/attribution-text and on // /operations/attribution-diarized. Both pages save the same block, which is // why the operations declare the same `settingsBlock` rather than one each. export function AttributionSettingsForm({ initial, digestApps, }: { initial: SiteSettings["attribution"]; digestApps: DigestAppDescriptor[]; }) { const [state, formAction, pending] = useActionState< SaveResult | undefined, FormData >(saveAttributionSettingsAction, undefined); return (
); }