import{g as u,i as g,a as _,j as i,_ as F,I as R,f as v,bD as O,aF as x}from"./main-343.js";import{F as s}from"./bf-838-284.js";import{t as S}from"./bf-689-322.js";import{a as h}from"./bf-603-251.js";function D({cls:d}){const{fieldKey:e}=u(),[t,n]=g(x),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(h,{id:"rdonly-stng",tip:S.readonly,title:F("Read-only"),action:c,isChecked:r,isPro:!0,proProperty:"readOnly"})})}export{D as F};
