"use client";
import { useResolvedValue } from "../hooks/use-resolved-value";
import { useStylesheetFactory } from "../hooks/use-stylesheet-factory";
import { useCssId } from "../hooks/use-css-id";
function ControlValue({
  data,
  definition,
  children,
  control
}) {
  const stylesheetFactory = useStylesheetFactory();
  const id = `cv-${useCssId()}`;
  const value = useResolvedValue(
    data,
    (data2, resourceResolver) => definition.resolveValue(data2, resourceResolver, stylesheetFactory.get(id), control),
    definition.config?.defaultValue
  );
  stylesheetFactory.useDefinedStyles();
  return children(value);
}
export {
  ControlValue
};
//# sourceMappingURL=control.js.map