import "./NoteTitleActions.css"; import clsx from "clsx"; import FNote from "../../entities/fnote"; import { t } from "../../services/i18n"; import CollectionProperties from "../note_bars/CollectionProperties"; import { PromotedAttributesContent, usePromotedAttributeData } from "../PromotedAttributes"; import Collapsible from "../react/Collapsible"; import { useNoteContext, useNoteProperty } from "../react/hooks"; import SearchDefinitionTab from "../ribbon/SearchDefinitionTab"; export default function NoteTitleActions() { const { note, ntxId, componentId } = useNoteContext(); const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_"); const noteType = useNoteProperty(note, "type"); const items = [ note && , note && noteType === "search" && , note && !isHiddenNote && noteType === "book" && ].filter(Boolean); return (
0 && "visible")}> {items}
); } function SearchProperties({ note, ntxId }: { note: FNote, ntxId: string | null | undefined }) { return (note && ); } function PromotedAttributes({ note, componentId }: { note: FNote | null | undefined, componentId: string }) { const [ cells, setCells ] = usePromotedAttributeData(note, componentId); if (!cells?.length) return false; return (note && ( )); }