{"version":3,"file":"types.js","names":[],"sources":["../../../src/elements/ListDrawer/types.ts"],"sourcesContent":["import type {\n CollectionPreferences,\n FilterOptionsResult,\n ListQuery,\n SanitizedCollectionConfig,\n} from 'payload'\nimport type React from 'react'\nimport type { HTMLAttributes } from 'react'\n\nimport type { ListDrawerContextProps } from './Provider.js'\n\n/**\n * @internal - this may change in a minor release\n */\nexport type RenderListServerFnArgs = {\n collectionSlug: string\n disableActions?: boolean\n disableBulkDelete?: boolean\n disableBulkEdit?: boolean\n disableQueryPresets?: boolean\n drawerSlug?: string\n enableRowSelections: boolean\n overrideEntityVisibility?: boolean\n query: ListQuery\n redirectAfterDelete?: boolean\n redirectAfterDuplicate?: boolean\n}\n\n/**\n * @internal - this may change in a minor release\n */\nexport type RenderListServerFnReturnType = {\n List: React.ReactNode\n preferences: CollectionPreferences\n}\n\nexport type ListDrawerProps = {\n readonly allowCreate?: boolean\n readonly collectionSlugs: SanitizedCollectionConfig['slug'][]\n readonly disableQueryPresets?: boolean\n readonly drawerSlug?: string\n readonly enableRowSelections?: boolean\n readonly filterOptions?: FilterOptionsResult\n readonly overrideEntityVisibility?: boolean\n readonly selectedCollection?: string\n} & ListDrawerContextProps\n\nexport type ListTogglerProps = {\n children?: React.ReactNode\n className?: string\n disabled?: boolean\n drawerSlug?: string\n} & HTMLAttributes\n\nexport type UseListDrawer = (args: {\n collectionSlugs?: SanitizedCollectionConfig['slug'][]\n filterOptions?: FilterOptionsResult\n overrideEntityVisibility?: boolean\n selectedCollection?: SanitizedCollectionConfig['slug']\n uploads?: boolean // finds all collections with upload: true\n}) => [\n React.FC>,\n React.FC>,\n {\n closeDrawer: () => void\n collectionSlugs: SanitizedCollectionConfig['slug'][]\n drawerDepth: number\n drawerSlug: string\n isDrawerOpen: boolean\n openDrawer: () => void\n setCollectionSlugs: React.Dispatch>\n toggleDrawer: () => void\n },\n]\n"],"mappings":"AAsDA","ignoreList":[]}