import{M as s}from"./MarkdownEditor-CiEF4kpS.js";import{_ as l}from"./Jeditor.vue_vue_type_style_index_0_lang-BtAK23jg.js";import{H as u}from"./HTML-GhBDym6t.js";import{C as f}from"./Code-CjbtRypR.js";import{d as p,r as _,w as m,i as v,X as y,ac as x,Z as E,c as r,g as C}from"./index-DOFLUERq.js";const T=p({__name:"Content",props:{df:{},record:{},canEdit:{type:Boolean},ctx:{}},setup(c){const t=c,o=_(t.record.content_type||t.df.default_content_type||"Jeditor");m(()=>t.record.content_type,e=>{o.value=e||t.df.default_content_type||"Jeditor"});const a=r(()=>{const e=o.value;return!e||e==="Jeditor"||e==="Rich Text"?l:e.includes("HTML")?u:e==="Code"?f:s}),n=r(()=>{const e=o.value;return!e||e==="Jeditor"||e==="Rich Text"}),d=r(()=>({df:t.df,modelValue:n.value?t.record[t.df.fieldname]??"":void 0,record:t.record,canEdit:t.canEdit,ctx:t.ctx})),i=r(()=>n.value?{"update:modelValue":e=>{t.record[t.df.fieldname]=e}}:{});return(e,g)=>(C(),v(E(a.value),y(d.value,x(i.value),{key:o.value}),null,16))}}),J=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"}));export{J as _};
