import { Component, HasOne } from "@contember/binding";
import { useDynamicSingleChoiceField } from "./hooks/useDynamicSingleChoiceField.js";
import { renderDynamicChoiceFieldStatic } from "./renderDynamicChoiceFieldStatic.js";
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
var _jsxFileName = "/__w/interface/interface/packages/admin/src/components/bindingFacade/fields/ChoiceField/DynamicSingleChoiceField.tsx";
const DynamicSingleChoiceField = Component((props) => props.children(useDynamicSingleChoiceField(props)), (props, environment) => {
  const {
    subTree,
    renderedOption
  } = renderDynamicChoiceFieldStatic(props, environment);
  return /* @__PURE__ */ jsxDEV(Fragment, {
    children: [subTree, /* @__PURE__ */ jsxDEV(HasOne, {
      field: props.field,
      expectedMutation: "connectOrDisconnect",
      children: renderedOption
    }, void 0, false, {
      fileName: _jsxFileName,
      lineNumber: 16,
      columnNumber: 6
    }, void 0)]
  }, void 0, true);
}, "DynamicSingleChoiceField");
export {
  DynamicSingleChoiceField
};
//# sourceMappingURL=DynamicSingleChoiceField.js.map
