{"version":3,"file":"index.js","names":["c","_c","getTranslation","FieldLabel","useConfig","useTranslation","useListDrawerContext","ReactSelect","listHeaderClass","drawerBaseClass","DrawerRelationshipSelect","$","i18n","t","config","t0","getEntityConfig","collections","enabledCollections","selectedOption","setSelectedOption","t1","Symbol","for","t2","t3","slug","includes","enabledCollectionConfigs","filter","length","activeCollectionConfig","collectionSlug","value","coll","label","labels","singular","_jsxs","className","children","_jsx","isClearable","onChange","options","map"],"sources":["../../../../src/elements/ListHeader/DrawerRelationshipSelect/index.tsx"],"sourcesContent":["'use client'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { FieldLabel } from '../../../fields/FieldLabel/index.js'\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { useListDrawerContext } from '../../ListDrawer/Provider.js'\nimport { ReactSelect } from '../../ReactSelect/index.js'\nimport { listHeaderClass } from '../index.js'\n\nconst drawerBaseClass = 'list-drawer'\n\nexport const DrawerRelationshipSelect = () => {\n const { i18n, t } = useTranslation()\n const {\n config: { collections },\n getEntityConfig,\n } = useConfig()\n const { enabledCollections, selectedOption, setSelectedOption } = useListDrawerContext()\n const enabledCollectionConfigs = collections.filter(({ slug }) =>\n enabledCollections.includes(slug),\n )\n if (enabledCollectionConfigs.length > 1) {\n const activeCollectionConfig = getEntityConfig({ collectionSlug: selectedOption.value })\n\n return (\n