'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.FormItemPrefixContext = exports.FormProvider = exports.FormItemContext = exports.FormContext = undefined;

var _react = require('react');

var React = _interopRequireWildcard(_react);

var _omit = require('omit.js');

var _omit2 = _interopRequireDefault(_omit);

var _rcFieldForm = require('rc-field-form');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }

var FormContext = exports.FormContext = React.createContext({
    labelAlign: 'right',
    vertical: false,
    itemRef: function itemRef() {}
});
var FormItemContext = exports.FormItemContext = React.createContext({
    updateItemErrors: function updateItemErrors() {}
});
var FormProvider = exports.FormProvider = function FormProvider(props) {
    // @ts-ignore
    var providerProps = (0, _omit2['default'])(props, ['prefixCls']);
    return React.createElement(_rcFieldForm.FormProvider, providerProps);
};
var FormItemPrefixContext = exports.FormItemPrefixContext = React.createContext({
    prefixCls: ''
});