import useDataSource from "../hooks/useDataSource.js";
import useVariables from "../hooks/useVariables.js";
import useComponentId from "../hooks/useComponentId.js";
import React, { useEffect } from "react";
//#region src/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.tsx
const BaseWrapper = (props) => {
	const { children } = props;
	const componentId = useComponentId(props);
	const { get, list } = useDataSource();
	const { registerValueVariable } = useVariables();
	useEffect(() => {
		if (componentId) registerValueVariable === null || registerValueVariable === void 0 || registerValueVariable(componentId, {
			get,
			list
		});
	}, [
		get,
		list,
		componentId
	]);
	return /* @__PURE__ */ React.createElement("div", null, children);
};
//#endregion
export { BaseWrapper as default };
