'use client'; import clsx from 'clsx'; import { IconMenuFold, IconMenuUnfold } from '@/components/Icons'; import { Button } from '@/components/ui/Control'; import { useDropdown } from '@/components/ui/Dropdown'; import { SelectTree } from '@/components/ui/Input'; import { HelpTopic, topicParent } from '@/models/miscellaneous'; import { useAppLayoutStore, useFitHeight } from '@/stores/appLayout'; import { PARAMETER, prefixes } from '@/utils/constants'; import { describeHelpTopic, labelHelpTopic } from '@/utils/labels'; interface TopicsDropdownProps { activeTopic: HelpTopic; onChangeTopic: (newTopic: HelpTopic) => void; } function TopicsDropdown({ activeTopic, onChangeTopic }: TopicsDropdownProps) { const menu = useDropdown(); const noNavigation = useAppLayoutStore(state => state.noNavigation); const treeHeight = useFitHeight('4rem + 2px'); function handleSelectTopic(topic: HelpTopic) { menu.hide(); onChangeTopic(topic); } return (