"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.InputConsumer = void 0;
var _react = _interopRequireDefault(require("react"));
var _InputContext = require("../../InputContext");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Input/components/InputConsumer/InputConsumer.tsx";
var InputConsumer = _ref => {
  var {
    consumerCompName = 'InputConsumer',
    children
  } = _ref;
  if (typeof children !== 'function') {
    throw new Error("child of ".concat(consumerCompName, " must be a context consumer function"));
  }
  return /*#__PURE__*/_react.default.createElement(_InputContext.InputContext.Consumer, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 19,
      columnNumber: 5
    }
  }, context => {
    if (!context) {
      throw new Error("".concat(consumerCompName, " cannot be rendered outside the Input component"));
    }
    return children(context);
  });
};
exports.InputConsumer = InputConsumer;
//# sourceMappingURL=InputConsumer.js.map