import{n as f,d as p,c as F,a as m,o as k}from"./widget-BUAABBRb.js";import{C as y,b as t}from"./convert-case-to-camel-case.utils-DDUpNI96.js";function h(n){const{field:a}=y(n),r=f(),o=p(),s=F(),c=k(),i=t(()=>a.value.selectedOption),d=t(()=>i.value),g=t(()=>s.checkFieldRequired(a.value)),v=t(()=>{var e;return((e=i.value)==null?void 0:e.optionValue)||99999}),S=e=>{var l;if((e==null?void 0:e.optionValue)!==((l=i.value)==null?void 0:l.optionValue)){let u=0;e!=null&&e.optionValue&&a.value.summaryView!=="show_label_not_calculable"&&(u=+(e==null?void 0:e.optionValue).split("_")[0]||0),a.value.selectedOption=e,a.value.value=u,a.value.displayValue=c.getMultipleOptionsFieldDisplayView(a.value),s.updateField(a.value.alias,a.value),r.applyConditionForField(a.value.alias),s.getPageBreakEnabled&&s.getActivePage.action==="not_skip"&&o.checkPageFieldsConditions()}},V=t(()=>{var l;return((l=m().getWarningTexts)==null?void 0:l.requiredMsg)||""});return{field:a,selectValue:S,fieldValue:d,isRequired:g,getKey:v,requiredWarningText:V}}export{h as u};
//# sourceMappingURL=useSingleOptionFieldShared-DgCmtnlP.js.map
