import{g as j,i as v,aH as S,a as b,j as e,_ as a,h as F,f as N,bG as T}from"./main-634.js";import{F as t}from"./bf-767-388.js";import{F as _}from"./bf-457-387.js";import{S as f}from"./bf-982-242.js";import"./bf-534-247.js";import"./bf-25-81.js";import"./bf-299-245.js";import"./bf-497-246.js";import"./bf-641-107.js";import"./bf-400-72.js";import"./bf-438-114.js";function K(){var m,g,h;const{fieldKey:s}=j(),[d,x]=v(S),{css:i}=b();if(!s)return null;const o=d[s],c=(o==null?void 0:o.config)||{},y=(m=o==null?void 0:o.lbl)!=null?m:s,p=(n,l)=>{const u=N(d,r=>{r[s].config=r[s].config||{},r[s].config[n]=l});x(u),T({event:`OTP ${n} changed to ${l}: ${y}`,type:`otp_${n}_changed`,state:{fields:u,fldKey:s}})};return e.jsxs(e.Fragment,{children:[e.jsx(f,{id:"otp-digit-len-stng",title:a("OTP Code Length"),className:i([t.fieldSection,t.hover_tip]),tip:a("Set how many digits the OTP code will contain. Accepted range: 4 – 8."),open:!0,children:e.jsxs("div",{className:i(t.placeholder),children:[e.jsx("input",{id:"otp-length",type:"number",className:i(t.input),value:(g=c.otpLength)!=null?g:6,onChange:n=>{const l=Math.min(8,Math.max(4,parseInt(n.target.value,10)||6));p("otpLength",l)}}),e.jsx("p",{className:i(F.helpText),children:a("Allowed range: 4 to 8 digits.")})]})}),e.jsx(_,{}),e.jsx(f,{id:"otp-resend-delay-stng",title:a("OTP Resend Delay (Seconds)"),className:i([t.fieldSection,t.hover_tip]),tip:a('Sets the waiting time (in seconds) before the "Resend OTP" button becomes active again.'),open:!0,children:e.jsx("div",{className:i(t.placeholder),children:e.jsx("input",{id:"resend-delay",type:"number",className:i(t.input),value:(h=c.resendDelay)!=null?h:60,onChange:n=>p("resendDelay",parseInt(n.target.value,10)||60)})})})]})}export{K as default};
