import{r as i,j as s,cq as u,c0 as d}from"./index-DCNLpqIv.js";import{a as n}from"./useBasicWidgetState-9vtYd9vP.js";import"./FormClearHelper-fvwQICEk.js";const f=(e,t)=>e.getStringValue(t),b=e=>e.default??null,p=e=>e.value??null,c=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},S=({element:e,disabled:t,widgetMgr:a,fragmentId:l})=>{const[o,r]=n({getStateFromWidgetMgr:f,getDefaultStateFromProto:b,getCurrStateFromProto:p,updateWidgetMgrState:c,element:e,widgetMgr:a,fragmentId:l}),g=i.useCallback(m=>{r({value:m,fromUi:!0})},[r]);return s.jsx(u,{label:e.label,labelVisibility:d(e.labelVisibility?.value),help:e.help,onChange:g,disabled:t,value:o})},v=i.memo(S);export{v as default};
