"use client"; import { useState } from "react"; export default function ControlBar({ onEnrich, onApplyChanges, onDownload, enriched, loading, loadingMessage, headingFontSize, onFontSizeChange, classifications, }) { const [showPromptEditor, setShowPromptEditor] = useState(false); const [customPrompt, setCustomPrompt] = useState(""); const [model, setModel] = useState("llama3"); const headingCount = classifications.filter((c) => c.isHeading).length; const handleEnrich = () => { onEnrich(model, customPrompt || undefined); }; const handleApplyManualChanges = () => { const headingIndices = classifications .filter((c) => c.isHeading) .map((c) => c.index); onApplyChanges(headingIndices); }; return (