import React, { useEffect } from 'react';
import useDataSource from "../hooks/useDataSource";
import useVariables from "../hooks/useVariables";
import useComponentId from "../hooks/useComponentId";
var BaseWrapper = function BaseWrapper(props) {
  var children = props.children;
  var componentId = useComponentId(props);
  var _useDataSource = useDataSource(),
    get = _useDataSource.get,
    list = _useDataSource.list;
  var _useVariables = useVariables(),
    registerValueVariable = _useVariables.registerValueVariable;
  useEffect(function () {
    if (componentId) {
      registerValueVariable === null || registerValueVariable === void 0 || registerValueVariable(componentId, {
        get: get,
        list: list
      });
    }
  }, [get, list, componentId]);
  return /*#__PURE__*/React.createElement("div", null, children);
};
export default BaseWrapper;