'use strict';

var vue = require('vue');
var type = require('../_util/type.js');

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

exports.GlobalConfigContextKey = GlobalConfigContextKey;
exports.GlobalFormContextKey = GlobalFormContextKey;
exports.configProviderKey = configProviderKey;
exports.configProviderProps = configProviderProps;
exports.defaultConfigProvider = defaultConfigProvider;
exports.defaultIconPrefixCls = defaultIconPrefixCls;
exports.useConfigContextInject = useConfigContextInject;
exports.useConfigContextProvider = useConfigContextProvider;
exports.useInjectGlobalForm = useInjectGlobalForm;
exports.useProvideGlobalForm = useProvideGlobalForm;
//# sourceMappingURL=context.js.map
