import { createElement, Fragment } from "react";
import { Component, HasOne } from "@contember/binding";
import { useDynamicSingleChoiceField } from "./hooks/useDynamicSingleChoiceField.js";
import { renderDynamicChoiceFieldStatic } from "./renderDynamicChoiceFieldStatic.js";
const DynamicSingleChoiceField = Component((props) => props.children(useDynamicSingleChoiceField(props)), (props, environment) => {
  const { subTree, renderedOption } = renderDynamicChoiceFieldStatic(props, environment);
  return /* @__PURE__ */ createElement(Fragment, null, subTree, /* @__PURE__ */ createElement(HasOne, {
    field: props.field,
    expectedMutation: "connectOrDisconnect"
  }, renderedOption));
}, "DynamicSingleChoiceField");
export { DynamicSingleChoiceField };
//# sourceMappingURL=DynamicSingleChoiceField.js.map
