import{g as O,i as C,aH as h,a as b,j as y,_ as F,f as S,bG as $}from"./main-634.js";import{F as c}from"./bf-767-388.js";import{S as x}from"./bf-497-246.js";import"./bf-25-81.js";function k({className:d=""}){var e,i,l;const{fieldKey:o}=O(),[s,m]=C(h),{css:p}=b();if(!o)return null;const t=s[o],r=(i=(e=t==null?void 0:t.config)==null?void 0:e.allowCustomOption)!=null?i:!1,u=(l=t==null?void 0:t.adminLbl)!=null?l:"",f=g=>{const{checked:n}=g.target,a=S(s,w=>{w[o].config.allowCustomOption=n});m(a),$({event:`Allow Custom Option ${n?"On":"Off"}: ${t.lbl||u||o}`,type:"allowCustomOption_change",state:{fields:a,fldKey:o}})};return y.jsx(x,{id:"alw-cstm-opt-stng",className:`${p(c.fieldSection,c.singleOption)} ${d}`,title:F("Allow Custom Option:"),action:f,isChecked:r,isPro:!0,tip:"By disabling this option, the field allow custom option will be hidden"})}export{k as default};
