import { FilterAlt } from '@mui/icons-material' import { Box, Stack, Typography } from '@mui/joy' import { getIconComponent } from '../../../utils/ProjectIcons.jsx' const MyChoreHeader = ({ activeFilterId, activeFilter, selectedProject, tempFilter, tempFilterMeta, }) => { if ( !activeFilterId && !tempFilter && (!selectedProject || selectedProject.id === 'default') ) return null const renderIcon = () => { if (tempFilter) { return tempFilterMeta?.icon ? ( {tempFilterMeta.icon} ) : ( ) } if (activeFilterId) { return } if (selectedProject) { const iconValue = selectedProject.icon || 'FolderOpen' const IconComponent = getIconComponent(iconValue) return ( ) } return null } const name = tempFilter ? tempFilterMeta?.name || 'Smart Filter' : activeFilter?.name || selectedProject?.name const description = tempFilter ? tempFilterMeta?.description : activeFilter?.description || selectedProject?.description return ( {renderIcon()} {name} {description && ( {description} )} ) } export default MyChoreHeader