import{_}from"./fgJwUmlt.js";import{u}from"./CIaRsw82.js";import{d as h,I as y,J as g,o as p,e as d,a as o,t as c,b as t,f as v,z as b}from"./BvNnk7SS.js";import{q as x}from"./BJLPbHX2.js";import"./DPZI2Lq5.js";import"./BWgwykTL.js";import"./Bp47c7wY.js";import"./BXBHssRj.js";import"./DGhmaXto.js";import"./9QyWfnsF.js";import"./eQq4h1B_.js";import"./DQ_4YmnO.js";const C={rounded:"","bg-active":"",px1:"",contenteditable:"false"},P={"font-mono":"",op80:"","mb--3":"","text-2.75":""},S={key:0,"mt-3":""},w={"text-red":""},z=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(N,r)=>{const l=_;return p(),d("div",C,[o("div",P,[o("div",null,"Page "+c(t(a)?t(a)._file:t(e).path),1)]),t(a)?v("",!0):(p(),d("div",S,[o("p",w," No file found at path "+c(t(e).path),1)])),b(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{z as default};
