import { SchemaType } from '@sanity/types'; import { getTemplateById } from '@sanity/initial-value-templates'; import type { InitialValueTemplateItem } from '@sanity/structure'; declare type Template = NonNullable>; /** * The result of parsing the `new-document-structure` against the registered * initial value templates. */ export interface NewDocumentOption extends InitialValueTemplateItem { subtitle?: string; /** * the matching template */ template: Template; /** * A type that matches the `template.schemaType` */ schemaType: SchemaType; } /** * Returns the result of parsing the `new-document-structure` against the * registered initial value templates. * * This API should be used whenever a new document needs to be created outside * the context of the desk tool structure (e.g. references, in the * default-layout navbar) * * Each option returned will correspond to one new-document structure item * inside of the array the `new-document-structure` exports (or the default * value array from the structure builder) */ declare const getNewDocumentOptionsOnce: typeof getNewDocumentOptions; export { getNewDocumentOptionsOnce as getNewDocumentOptions }; declare function getNewDocumentOptions(): NewDocumentOption[]; //# sourceMappingURL=getNewDocumentOptions.d.ts.map