import { Collapse } from '@mui/material' import type { PropsWithChildren, ReactNode } from 'react' import { useId } from 'react' import { Card } from '../../../components/Card/Card.js' import { CardRowButton, CardTitleContainer, CardValue, } from '../../../components/Card/CardButton.style.js' import { useSettingsCardExpandable } from './SettingsAccordian.js' import type { SettingCardTitle } from './types.js' interface SettingCardExpandableProps extends SettingCardTitle { value: ReactNode } export const SettingCardExpandable: React.FC< PropsWithChildren > = ({ icon, title, value, children }) => { const { expanded, toggleExpanded } = useSettingsCardExpandable() const buttonId = useId() const collapseId = useId() return ( {icon} {title} {!expanded && value} {children} ) }