import{_}from"./BZKN_dzZ.js";import{u}from"./DDOpIcVM.js";import{d as h,B as y,C as g,i as p,o as d,f as o,e as v,a9 as C,t as c,u as t}from"./Bxv1kRJt.js";import{q as x}from"./Dwvp_P-r.js";import"./C6KK1e8t.js";import"./BQlbyX0m.js";import"./Y8sfbbmi.js";import"./CJ5NhiWv.js";import"./Dv7rEyVi.js";import"./XWxoP7r2.js";import"./Bf7bwUep.js";import"./Fma_4dAm.js";const b={rounded:"","bg-active":"",px1:"",contenteditable:"false"},P={"font-mono":"",op80:"","mb--3":"","text-2.75":""},S={key:0,"mt-3":""},w={"text-red":""},M=h({__name:"PageContentEditor",props:{contentRef:{type:[String,Object,Function]},view:{},getPos:{type:Function},setAttrs:{type:Function},node:{},selected:{},decorations:{},innerDecorations:{}},async setup(m){let n,s;const i=m,{getComponentProps:f}=u(),{model:e}=f(i,{id:{type:String},class:{type:String,default:""},path:{type:String}}),{data:a}=([n,s]=y(()=>g(`page-content-${e.path}`,()=>x(e.path).findOne())),n=await n,s(),n);return(B,r)=>{const l=_;return d(),p("div",b,[o("div",P,[o("div",null,"Page "+c(t(a)?t(a)._file:t(e).path),1)]),t(a)?v("",!0):(d(),p("div",S,[o("p",w," No file found at path "+c(t(e).path),1)])),C(l,{path:t(e).path},null,8,["path"]),o("div",{ref:i.contentRef,class:"mb4 pt1 mt--2 [&:has([data-node-view-content]:empty)]:hidden",border:"t base",flex:"~ col"},r[0]||(r[0]=[o("div",{"text-2.75":"","font-mono":"",op80:""}," Content rendered if file not found: ",-1)]),512)])}}});export{M as default};
