import { slicedToArray as _slicedToArray, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
import { jsx } from '@emotion/core';
import { forwardRef } from 'react';
import _pt from 'prop-types';
import { useConnectedField } from '../hooks/useConnectedField.esm.js';
import { CheckboxFieldBlock } from './CheckboxFieldBlock.esm.js';

var CheckboxConnectedField = forwardRef(function CheckboxConnectedField(props, ref) {
  var _useConnectedField = useConnectedField(props.name),
      _useConnectedField2 = _slicedToArray(_useConnectedField, 1),
      connectedProps = _useConnectedField2[0];

  return jsx(CheckboxFieldBlock, _extends({
    ref: ref
  }, connectedProps, props));
});
CheckboxConnectedField.propTypes = {
  name: _pt.string.isRequired,
  id: _pt.string,
  label: _pt.node
};
CheckboxConnectedField.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "CheckboxConnectedField"
};

if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
  STORYBOOK_REACT_CLASSES["src/components/form/components/CheckboxConnectedField.tsx"] = {
    name: "CheckboxConnectedField",
    docgenInfo: CheckboxConnectedField.__docgenInfo,
    path: "src/components/form/components/CheckboxConnectedField.tsx"
  };
}

export { CheckboxConnectedField };
//# sourceMappingURL=CheckboxConnectedField.esm.js.map
