{"version":3,"file":"SummaryContext.mjs","sources":["../../../../../../../packages/vue-components/vc-table/src/context/SummaryContext.tsx"],"sourcesContent":["import type { InjectionKey } from 'vue';\nimport type { ColumnType, StickyOffsets } from '../interface';\nimport { inject, provide } from 'vue';\n\nexport type FlattenColumns<RecordType> = ReadonlyArray<ColumnType<RecordType> & {\n  scrollbar?: boolean;\n}>;\ninterface SummaryContextProps {\n  stickyOffsets?: StickyOffsets;\n  scrollColumnIndex?: number;\n  flattenColumns?: FlattenColumns<any>;\n}\n\nexport const SummaryContextKey: InjectionKey<SummaryContextProps> = Symbol('SummaryContextProps');\n\nexport function useProvideSummary(props: SummaryContextProps) {\n  provide(SummaryContextKey, props);\n}\n\nexport function useInjectSummary() {\n  return inject(SummaryContextKey, {} as SummaryContextProps);\n}\n"],"names":["SummaryContextKey","Symbol","useProvideSummary","props","provide","useInjectSummary","inject"],"mappings":";;AAaaA,MAAAA,iBAAAA,GAAuDC,OAAO,qBAAqB,EAAA;AAEzF,SAASC,kBAAkBC,KAA4B,EAAA;AAC5DC,EAAAA,OAAAA,CAAQJ,mBAAmBG,KAAK,CAAA,CAAA;AAClC,CAAA;AAEO,SAASE,gBAAmB,GAAA;AACjC,EAAOC,OAAAA,MAAAA,CAAON,iBAAmB,EAAA,EAAyB,CAAA,CAAA;AAC5D;;;;"}