import { useLingui } from '@lingui/react/macro'; import { createCallable } from 'react-call'; import type { TDropdownFieldMeta } from '@documenso/lib/types/field-meta'; import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from '@documenso/ui/primitives/command'; export type SignFieldDropdownDialogProps = { fieldMeta: TDropdownFieldMeta; }; export const SignFieldDropdownDialog = createCallable( ({ call, fieldMeta }) => { const { t } = useLingui(); const values = fieldMeta.values?.map((value) => value.value) ?? []; return ( (!value ? call.end(null) : null)} > No results found. {values.map((value, i) => ( call.end(value)} key={i} value={value}> {value} ))} ); }, );