import { j as u, i as n, l as c } from "./index-CsBCemCF.js";
import { memo as m, useCallback as g } from "react";
import { u as f } from "./useBasicWidgetState-KOlq_goV.js";
const b = (t, e) => t.getStringValue(e), d = (t) => t.default ?? null, p = (t) => t.value ?? null, C = (t, e, o, r) => {
  e.setStringValue(t, o.value, {
    fromUi: o.fromUi
  }, r);
}, S = ({
  element: t,
  disabled: e,
  widgetMgr: o,
  fragmentId: r
}) => {
  const [a, l] = f({
    getStateFromWidgetMgr: b,
    getDefaultStateFromProto: d,
    getCurrStateFromProto: p,
    updateWidgetMgrState: C,
    element: t,
    widgetMgr: o,
    fragmentId: r
  }), i = g((s) => {
    l({
      value: s,
      fromUi: !0
    });
  }, [l]);
  return /* @__PURE__ */ u.jsx(n, { label: t.label, labelVisibility: c(t.labelVisibility?.value), help: t.help, onChange: i, disabled: e, value: a });
}, k = m(S);
export {
  k as default
};
//# sourceMappingURL=index-C-iz7Ope.js.map
