import{a as v,g as x,i as $,aH as M,u as d,k as S,$ as j,H as F,j as r,_ as N,f as k,bG as P,ed as _}from"./main-634.js";import{F as n}from"./bf-767-388.js";import{E as w}from"./bf-178-233.js";import{S as A}from"./bf-982-242.js";import"./bf-692-111.js";import"./bf-400-72.js";import"./bf-25-81.js";import"./bf-438-114.js";import"./bf-486-243.js";import"./bf-497-246.js";import"./bf-723-244.js";import"./bf-299-245.js";import"./bf-534-247.js";import"./bf-962-248.js";import"./bf-343-249.js";import"./bf-791-250.js";import"./bf-641-107.js";import"./bf-570-251.js";import"./bf-838-80.js";import"./bf-297-103.js";import"./bf-284-252.js";import"./bf-17-106.js";import"./bf-671-253.js";import"./bf-334-254.js";import"./bf-710-385.js";import"./bf-676-386.js";import"./bf-638-271.js";import"./bf-247-269.js";import"./bf-423-273.js";import"./bf-457-387.js";import"./bf-577-275.js";import"./bf-288-389.js";import"./bf-939-390.js";function ut(){const{css:m}=v(),{fieldKey:i}=x(),[a,c]=$(M),s=d(S),f=d(j),{isPro:p}=f;if(!i)return null;const t=F(a[i]),g=t.adminLbl||"",b=t.mn||"",o=(s==null?void 0:s.err)||{},h=e=>{var u;if(!p)return;Number(e.target.value)?(t.mn=e.target.value,t.err||(t.err={}),t.err.mn||(t.err.mn={}),t.err.mn.dflt=((u=o==null?void 0:o[t.typ])==null?void 0:u.mn)||`<p style="margin:0">Minimum ${e.target.value} option${Number(e.target.value)>1?"s":""}<p>`,t.err.mn.show=!0):delete t.mn;const l=k(a,y=>{y[i]=t});c(l),P({event:`Min value updated to ${e.target.value}: ${t.lbl||g||i}`,type:"set_min",state:{fields:l,fldKey:i}}),e.target.value>="1"&&!t.req&&_({target:{checked:!0}})};return r.jsxs(A,{id:"mnmm-stng",title:N("Minimum"),className:m(n.fieldSection),tip:"Set minimum number to be selected for checkbox option",isPro:!0,proProperty:"mimimumOption",children:[r.jsx("div",{className:m(n.placeholder),children:r.jsx("input",{"data-testid":"mnmm-stng-inp","aria-label":"Minimum number",className:m(n.input),value:b,type:"number",onChange:h,disabled:!p})}),t.mn&&r.jsx(w,{id:"mnmm-stng",type:"mn",title:"Min Error Message",tipTitle:`By enabling this feature, user will see the error message when selected checkbox is less than ${t.mn}`})]})}export{ut as default};
