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