import{w as u,h as g,a as _,j as i,_ as F,I as R,g as v,aU as O,ab as h}from"./main-40.js";import{F as s}from"./bf-350-158.js";import{t as x}from"./bf-541-191.js";import{a as S}from"./bf-142-111.js";function H({cls:d}){const{fieldKey:e}=u(),[t,n]=g(h),r=t[e].valid.readonly||!1,{css:f}=_(),c=y=>{if(!R)return;const{checked:a}=y.target,l=v(t,m=>{const o=m[e];a?o.valid.readonly=!0:delete o.valid.readonly}),p=a?"on":"off";n(l),O({event:`Read only field ${p}`,type:"read_only_field_on_off",state:{fields:l,fldKey:e}})};return i.jsx("div",{className:`${f(s.fieldSection,s.singleOption,s.hover_tip)} ${d}`,children:i.jsx(S,{id:"rdonly-stng",tip:x.readonly,title:F("Read-only"),action:c,isChecked:r,isPro:!0,proProperty:"readOnly"})})}export{H as F};
