"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 = ( ); if (collapsed === undefined) { return (
{body}
); } return ( undefined)} bodyClassName="flex flex-wrap items-end gap-x-3 gap-y-2 px-3.5 pb-2.5" > {body} ); });