import { provide, inject, computed } from 'vue';
import { objectType } from '../_util/type.mjs';

const defaultIconPrefixCls = "anticon";
const GlobalFormContextKey = Symbol("GlobalFormContextKey");
const useProvideGlobalForm = (state) => {
  provide(GlobalFormContextKey, state);
};
const useInjectGlobalForm = () => {
  return inject(GlobalFormContextKey, { validateMessages: computed(() => void 0) });
};
const GlobalConfigContextKey = Symbol("GlobalConfigContextKey");
const configProviderProps = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: objectType(),
  input: objectType(),
  autoInsertSpaceInButton: { type: Boolean, default: void 0 },
  locale: objectType(),
  pageHeader: objectType(),
  componentSize: {
    type: String
  },
  componentDisabled: { type: Boolean, default: void 0 },
  direction: {
    type: String
  },
  space: objectType(),
  virtual: { type: Boolean, default: void 0 },
  dropdownMatchSelectWidth: { type: [Number, Boolean], default: true },
  form: objectType(),
  pagination: objectType(),
  theme: objectType(),
  select: objectType()
});
const configProviderKey = Symbol("configProvider");
const defaultConfigProvider = {
  getPrefixCls: (suffixCls, customizePrefixCls) => {
    if (customizePrefixCls)
      return customizePrefixCls;
    return suffixCls ? `ant-${suffixCls}` : "ant";
  },
  iconPrefixCls: computed(() => defaultIconPrefixCls),
  getPopupContainer: computed(() => () => document.body)
};
const useConfigContextInject = () => {
  return inject(configProviderKey, defaultConfigProvider);
};
const useConfigContextProvider = (props) => {
  return provide(configProviderKey, props);
};

export { GlobalConfigContextKey, GlobalFormContextKey, configProviderKey, configProviderProps, defaultConfigProvider, defaultIconPrefixCls, useConfigContextInject, useConfigContextProvider, useInjectGlobalForm, useProvideGlobalForm };
//# sourceMappingURL=context.mjs.map
