{"version":3,"file":"TreeSelectContext.mjs","sources":["../../../../../../packages/vue-components/vc-tree-select/src/TreeSelectContext.ts"],"sourcesContent":["import type { InjectionKey } from 'vue';\nimport type { ExpandAction } from '../../vc-tree/src/props';\nimport type { DefaultOptionType, InternalFieldName, OnInternalSelect } from './TreeSelect';\nimport { inject, provide } from 'vue';\n\nexport interface TreeSelectContextProps {\n  virtual?: boolean;\n  dropdownMatchSelectWidth?: boolean | number;\n  listHeight: number;\n  listItemHeight: number;\n  treeData: DefaultOptionType[];\n  fieldNames: InternalFieldName;\n  onSelect: OnInternalSelect;\n  treeExpandAction?: ExpandAction;\n}\n\nconst TreeSelectContextPropsKey: InjectionKey<TreeSelectContextProps> = Symbol(\n  'TreeSelectContextPropsKey',\n);\n\nexport function useProvideSelectContext(props: TreeSelectContextProps) {\n  return provide(TreeSelectContextPropsKey, props);\n}\nexport default function useInjectSelectContext() {\n  return inject(TreeSelectContextPropsKey, {} as TreeSelectContextProps);\n}\n"],"names":[],"mappings":";;AAgBA,MAAM,yBAAkE,GAAA,MAAA;AAAA,EACtE,2BAAA;AACF,CAAA,CAAA;AAEO,SAAS,wBAAwB,KAA+B,EAAA;AACrE,EAAO,OAAA,OAAA,CAAQ,2BAA2B,KAAK,CAAA,CAAA;AACjD,CAAA;AACA,SAAwB,sBAAyB,GAAA;AAC/C,EAAO,OAAA,MAAA,CAAO,yBAA2B,EAAA,EAA4B,CAAA,CAAA;AACvE;;;;"}