import { getDropdownItemsForAllEditors } from '@/Utils/DropdownItemsForEditors'
import { NoteType } from '@standardnotes/snjs'
import { useApplication } from '../ApplicationProvider'
import { PredicateKeypath, PredicateKeypathTypes } from './PredicateKeypaths'
type Props = {
keypath: PredicateKeypath
value: string
setValue: (value: string) => void
}
const PredicateValue = ({ keypath, value, setValue }: Props) => {
const application = useApplication()
const type = PredicateKeypathTypes[keypath]
const editorItems = getDropdownItemsForAllEditors(application)
return type === 'noteType' ? (
) : type === 'editorIdentifier' ? (
) : type === 'string' || type === 'date' ? (
{
setValue(event.target.value)
}}
/>
) : type === 'boolean' ? (
) : type === 'number' ? (
{
setValue(event.target.value)
}}
/>
) : null
}
export default PredicateValue