import type { SanityDocument, SchemaType } from '@sanity/types'; import React from 'react'; import { Observable } from 'rxjs'; import type { SearchItemPreviewState } from './types'; /** * Helper functions for retrieving and rendering document previews in search results. * * @todo Consider amalgamating with pane item helpers (which this is based off) * @see /packages/desk-tool/components/paneItem/helpers.tsx */ interface PreviewValue { displayOptions?: { showIcon?: boolean; }; icon?: boolean; id?: string; media?: React.ReactNode | React.ComponentType; schemaType?: { name?: string; }; subtitle?: React.ReactNode; title?: React.ReactNode; type?: string; } export declare const getValueWithFallback: ({ value, draft, published, }: { value: SanityDocument; draft?: SanityDocument | null; published?: SanityDocument | null; }) => PreviewValue | SanityDocument; export declare function getPreviewStateObservable(schemaType: SchemaType, documentId: string, title: unknown): Observable; export {}; //# sourceMappingURL=helpers.d.ts.map