{"version":3,"file":"context.mjs","sources":["../../../../../../packages/components/grid/src/context.ts"],"sourcesContent":["import type { ComputedRef, InjectionKey, Ref } from 'vue';\nimport { computed, inject, provide } from 'vue';\n\nexport interface RowContext {\n  gutter: ComputedRef<[number, number]>\n  wrap: ComputedRef<boolean>\n  supportFlexGap: Ref<boolean>\n}\n\nexport const RowContextKey: InjectionKey<RowContext> = Symbol('rowContextKey');\n\nfunction useProvideRow(state: RowContext) {\n  provide(RowContextKey, state);\n}\n\nfunction useInjectRow() {\n  return inject(RowContextKey, {\n    gutter: computed(() => undefined),\n    wrap: computed(() => undefined),\n    supportFlexGap: computed(() => undefined),\n  });\n}\n\nexport { useInjectRow, useProvideRow };\nexport default useProvideRow;\n"],"names":[],"mappings":";;AASa,MAAA,aAAA,GAA0C,OAAO,eAAe,EAAA;AAE7E,SAAS,cAAc,KAAmB,EAAA;AACxC,EAAA,OAAA,CAAQ,eAAe,KAAK,CAAA,CAAA;AAC9B,CAAA;AAEA,SAAS,YAAe,GAAA;AACtB,EAAA,OAAO,OAAO,aAAe,EAAA;AAAA,IAC3B,MAAA,EAAQ,QAAS,CAAA,MAAM,KAAS,CAAA,CAAA;AAAA,IAChC,IAAA,EAAM,QAAS,CAAA,MAAM,KAAS,CAAA,CAAA;AAAA,IAC9B,cAAA,EAAgB,QAAS,CAAA,MAAM,KAAS,CAAA,CAAA;AAAA,GACzC,CAAA,CAAA;AACH;;;;"}