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