"use client";
import { memo } from "react";
import { useTranslation } from "react-i18next";
import {
summarizeVisualizeConfig,
type VisualizeFormConfig,
} from "@/lib/visualize-types";
import {
CollapsibleConfigSection,
Field,
INPUT_CLS,
} from "@/components/chat/home/composer-field";
interface VisualizeConfigPanelProps {
value: VisualizeFormConfig;
onChange: (next: VisualizeFormConfig) => void;
/**
* When provided, the panel is wrapped in a `CollapsibleConfigSection`.
* Omit both to render bare for the chat Activity panel.
*/
collapsed?: boolean;
onToggleCollapsed?: () => void;
}
export default memo(function VisualizeConfigPanel({
value,
onChange,
collapsed,
onToggleCollapsed,
}: VisualizeConfigPanelProps) {
const { t } = useTranslation();
const body = (