'use client'; import clsx from 'clsx'; import { motion } from 'framer-motion'; import { useCallback } from 'react'; import { RiMenuFoldFill, RiMenuUnfoldFill } from 'react-icons/ri'; import Button from '@/components/ui/Button'; import { useConceptTheme } from '@/context/ThemeContext'; import useDropdown from '@/hooks/useDropdown'; import { HelpTopic } from '@/models/miscellaneous'; import { animateSlideLeft } from '@/styling/animations'; import { prefixes } from '@/utils/constants'; import { describeHelpTopic, labelHelpTopic } from '@/utils/labels'; interface TopicsListDropDownProps { activeTopic: HelpTopic; onChangeTopic: (newTopic: HelpTopic) => void; } function TopicsListDropDown({ activeTopic, onChangeTopic }: TopicsListDropDownProps) { const menu = useDropdown(); const { noNavigation } = useConceptTheme(); const selectTheme = useCallback( (topic: HelpTopic) => { menu.hide(); onChangeTopic(topic); }, [onChangeTopic, menu] ); return (