"use client"; import { useCallback, useEffect, useState } from "react"; import type { WidgetPreset } from "yt-dlp-transcript-common/lib/widgetPresets"; import { BUILT_IN_PRESETS, type BuiltInPreset } from "yt-dlp-transcript-common/views/builtInPresets"; import { deleteWidgetPresetAction, renameWidgetPresetAction, saveWidgetPresetAction, } from "../presetActions"; // The preset library row, in the house pattern (ProfilesRow in // WorkspaceSearchBar, SavedChatsRow in /ask): a grouped e.target.value && load(e.target.value)} className="rounded border border-border bg-card px-2 py-0.5 text-sm text-foreground" > {data.builtIn.map((p) => ( ))} {data.saved.length > 0 && ( {data.saved.map((p) => ( ))} )} {dirty && ( • )} {hint &&

{hint}

} {error && (

{error}

)} ); } const PRESET_BTN = "text-xs text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50";