import { ContentType, SNTag } from '@standardnotes/snjs' import { FunctionComponent } from 'react' import FileListItem from './FileListItem' import NoteListItem from './NoteListItem' import { AbstractListItemProps } from './Types/AbstractListItemProps' const ContentListItem: FunctionComponent = (props) => { const getTags = () => { if (props.hideTags) { return [] } const selectedTag = props.appState.tags.selected if (!selectedTag) { return [] } const tags = props.appState.getItemTags(props.item) const isNavigatingOnlyTag = selectedTag instanceof SNTag && tags.length === 1 if (isNavigatingOnlyTag) { return [] } return tags.map((tag) => tag.title).sort() } switch (props.item.content_type) { case ContentType.Note: return case ContentType.File: return default: return null } } export default ContentListItem