{"version":3,"file":"propsContext.mjs","names":[],"sources":["../../../../../../../src/lib/propsContext/propsContext.ts"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type {\n  ComponentPropsContext,\n  PropsContext,\n} from \"@/lib/propsContext/types\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nexport const propsContext = createContext<PropsContext>({});\n\nexport const PropsContextProvider = propsContext.Provider;\n\nexport const usePropsContext = (): PropsContext => useContext(propsContext);\n\nexport const useComponentPropsContext = <C extends FlowComponentName>(\n  component: C,\n) => usePropsContext()[component] as ComponentPropsContext<C> | undefined;\n"],"mappings":";;;;AAOA,IAAa,eAAe,cAA4B,CAAC,CAAC;AAE1D,IAAa,uBAAuB,aAAa;AAEjD,IAAa,wBAAsC,WAAW,YAAY;AAE1E,IAAa,4BACX,cACG,gBAAgB,CAAC,CAAC"}