import{d as i,c as p,e as o,f as s,s as c,g as u,k as f,h as _,j as m,B as b,n as l,p as y}from"./index-a0da86f0.js";import{_ as v}from"./_plugin-vue_export-helper-c27b6911.js";const g={class:"field-label"},N={key:0,class:"required"},V={class:"json-field-container"},J=i({__name:"JSON",props:{df:{},record:{},canEdit:{type:Boolean},ctx:{}},setup(t){const d=t,n=p(()=>d.df.label_layout||"vertical");return(e,a)=>(l(),o("div",{class:b(["field-wrapper",`layout-${n.value}`])},[s("label",g,[c(u(e.ctx.t(e.df.label||e.df.fieldname))+" ",1),e.df.reqd?(l(),o("span",N,"*")):f("",!0)]),s("div",V,[_(m(y),{value:e.ctx.getJsonDisplayValue?e.ctx.getJsonDisplayValue(e.record[e.df.fieldname]):e.record[e.df.fieldname]??"","onUpdate:value":a[0]||(a[0]=r=>e.ctx.updateJsonValue&&e.ctx.updateJsonValue(e.df.fieldname,r)),type:"textarea",rows:12,placeholder:e.ctx.t(e.df.fieldname),disabled:!e.canEdit,class:"json-textarea"},null,8,["value","placeholder","disabled"])])],2))}});const S=v(J,[["__scopeId","data-v-b51c2816"]]),B=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"}));export{B as _};
