var F=Object.defineProperty;var u=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var f=(i,t,s)=>t in i?F(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s,j=(i,t)=>{for(var s in t||(t={}))C.call(t,s)&&f(i,s,t[s]);if(u)for(var s of u(t))N.call(t,s)&&f(i,s,t[s]);return i};import{g as D,i as _,A as $,r as w,a as A,j as e,_ as x,E,h as b,f as v,bD as k,aF as B}from"./main-343.js";import{a as L}from"./bf-794-390.js";import{F as o}from"./bf-838-284.js";import{C as M}from"./bf-649-79.js";import{a as K}from"./bf-603-251.js";import{F as I,A as V,b as z,c as R}from"./bf-622-233.js";import{D as T}from"./bf-245-393.js";import{F as U}from"./bf-773-387.js";import{F as d}from"./bf-505-323.js";import{R as H}from"./bf-276-389.js";import{S as g}from"./bf-711-253.js";import"./bf-498-326.js";import"./bf-689-322.js";import"./bf-697-110.js";import"./bf-90-70.js";import"./bf-594-113.js";import"./bf-983-247.js";import"./bf-810-248.js";import"./bf-914-249.js";import"./bf-870-250.js";import"./bf-411-252.js";import"./bf-901-254.js";import"./bf-656-255.js";import"./bf-806-256.js";import"./bf-519-87.js";import"./bf-190-88.js";import"./bf-318-257.js";import"./bf-437-78.js";import"./bf-123-272.js";import"./bf-453-86.js";import"./bf-772-285.js";import"./bf-209-80.js";import"./bf-529-105.js";import"./bf-730-282.js";import"./bf-623-283.js";function Ne(){const{fieldKey:i}=D(),[t,s]=_(B),a=$(t[i]),[y,m]=w.useState(!1),{css:l}=A();function S(c){const{checked:r}=c.target;if(r){const n=j({},a.valid);n.checked=!0,a.valid=n}else delete a.valid.checked;const p=v(t,n=>{n[i]=a});s(p),k({event:`Check by default ${r?"on":"off"} : ${a.adminLbl||i}`,type:"set_check_by_default",state:{fields:p,fldKey:i}})}const h=(c,r)=>{a.msg[r]=c;const p=v(t,n=>{n[i]=a});s(p),k({event:`${r[0].toUpperCase()+r.slice(1)} Value Modified to "${c}"`,type:`${r}_value_modify`,state:{fields:p,fldKey:i}})};return window.selectedFieldData=a,e.jsxs("div",{children:[e.jsx(I,{title:"Field Settings",subtitle:a.typ,fieldKey:i}),e.jsxs("div",{className:l(o.fieldSection),children:[e.jsxs("div",{className:`flx flx-between ${o.hover_tip}`,children:[e.jsxs("div",{className:"flx",children:[e.jsx("b",{children:"Label "}),e.jsx(M,{width:250,icnSize:17,className:"hover-tip",children:e.jsx("div",{className:"txt-body",children:x("Edit your decision box label by clicking on edit icon")})})]}),e.jsx("span",{"data-testid":"lbl-edt-btn",role:"button",tabIndex:"-1",className:"mr-2 cp",onClick:()=>m(!0),onKeyDown:()=>m(!0),children:e.jsx(E,{size:19})})]}),e.jsx("div",{className:`${l(L.errMsgBox)} ${l(b.mt2)}`,tabIndex:"0",role:"button",onClick:()=>m(!0),onKeyDown:()=>m(!0),children:e.jsx("p",{className:l(b.m0),children:"Click to edit decision box label"})})]}),e.jsx(d,{}),e.jsx(T,{labelModal:y,setLabelModal:m,title:x("Edit Decision Box Label")}),e.jsx(V,{}),e.jsx(d,{}),e.jsx(z,{}),e.jsx(d,{}),e.jsx(H,{asteriskIsAllow:!1}),e.jsx(d,{}),e.jsx(U,{}),e.jsx(d,{}),e.jsx(R,{}),e.jsx(d,{}),e.jsx(g,{id:"chek-val-stng",title:x("Checked Value"),className:l(o.fieldSection),open:!0,children:e.jsx("div",{className:l(o.placeholder),children:e.jsx("input",{"data-testid":"chek-val-inp","aria-label":"Checked value",className:l(o.input),type:"text",value:a.msg.checked||"",onChange:c=>h(c.target.value,"checked")})})}),e.jsx(d,{}),e.jsx(g,{id:"unchek-val-stng",title:x("Unchecked Value"),className:l(o.fieldSection),open:!0,children:e.jsx("div",{className:l(o.placeholder),children:e.jsx("input",{"data-testid":"unchek-val-inp","aria-label":"Uncheked value",className:l(o.input),type:"text",value:a.msg.unchecked||"",onChange:c=>h(c.target.value,"unchecked")})})}),e.jsx(d,{}),e.jsx("div",{className:l(o.fieldSection,o.hover_tip,{pr:"36px !important"}),children:e.jsx(K,{id:"chek-by-dflt",tip:"By disabling this option, the field checked by default will be hidden",title:x("Checked by Default"),action:S,isChecked:a.valid.checked})}),e.jsx(d,{})]})}export{Ne as default};
