{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/with-registry/index.tsx"],"sourcesContent":["import { createHigherOrderComponent } from '@wordpress/compose';\nimport { RegistryConsumer } from '../registry-provider';\n\n/**\n * Higher-order component which renders the original component with the current\n * registry context passed as its `registry` prop.\n */\nconst withRegistry = createHigherOrderComponent(\n\t( OriginalComponent ) => ( props: Record< string, unknown > ) => (\n\t\t<RegistryConsumer>\n\t\t\t{ ( registry ) => (\n\t\t\t\t<OriginalComponent { ...props } registry={ registry } />\n\t\t\t) }\n\t\t</RegistryConsumer>\n\t),\n\t'withRegistry'\n);\n\nexport default withRegistry;\n"],"mappings":";;;;;;;;AAOA,MAAM,eAAe,4BAClB,uBAAyB,UAC1B,oBAAC,kBAAD,EAAA,WACK,aACH,oBAAC,mBAAD;CAAmB,GAAK;CAAmB;AAAY,CAAA,EAEvC,CAAA,GAEnB,cACD"}