{"version":3,"file":"useContext.cjs","sources":["../../../../../../packages/components/descriptions/src/useContext.ts"],"sourcesContent":["import type { CSSProperties, InjectionKey, Ref } from 'vue';\nimport { createContextFn, useContext } from '@antdv/hooks';\nimport { ref } from 'vue';\n\nexport interface AppProviderContextProps {\n  labelStyle: Ref<CSSProperties>\n  contentStyle: Ref<CSSProperties>\n}\n\nconst key: InjectionKey<AppProviderContextProps> = Symbol('InjectionKey');\n\nexport function createProviderContext(context: AppProviderContextProps) {\n  return createContextFn<AppProviderContextProps>(key, context, {\n    reactiveable: false,\n  });\n}\n\nexport function useProviderContext() {\n  return useContext<AppProviderContextProps>(key, {\n    labelStyle: ref({}),\n    contentStyle: ref({}),\n  });\n}\n"],"names":["createContextFn","useContext","ref"],"mappings":";;;;;;AASA,MAAM,GAAA,GAA6C,OAAO,cAAc,CAAA,CAAA;AAEjE,SAAS,sBAAsB,OAAkC,EAAA;AACtE,EAAO,OAAAA,qBAAA,CAAyC,KAAK,OAAS,EAAA;AAAA,IAC5D,YAAc,EAAA,KAAA;AAAA,GACf,CAAA,CAAA;AACH,CAAA;AAEO,SAAS,kBAAqB,GAAA;AACnC,EAAA,OAAOC,iBAAoC,GAAK,EAAA;AAAA,IAC9C,UAAA,EAAYC,OAAI,CAAA,EAAE,CAAA;AAAA,IAClB,YAAA,EAAcA,OAAI,CAAA,EAAE,CAAA;AAAA,GACrB,CAAA,CAAA;AACH;;;;;"}