import{a as e,l as t}from"./preact.module-CNakwbc9.js";import{d as n,l as r,s as i,t as a}from"./hooks.module-BrXTvcfS.js";import{t as o}from"./jsxRuntime.module-Cao1NCKs.js";import{n as s}from"./RawHtml-BZRPHliO.js";import{a as c,s as l,t as u}from"./tabulator-b-o0XW-j.js";import{t as d}from"./data-L3eveVHg.js";n(),t();function f({note:t,noteIds:n,viewConfig:f,onReady:p}){let m=a(null),{columnDefs:h,rowData:g,hasChildren:_}=d(t,n,f,void 0,()=>{}),[v,y]=i();return r(()=>{v&&p?.({type:`collection`,ignoredNoteIds:[]})},[v]),g&&o(e,{children:[o(`h1`,{children:t.title}),o(`div`,{className:`table-print-view`,children:v?o(s,{html:v}):o(u,{tabulatorRef:m,className:`table-print-view-container`,modules:[c,l],columns:h??[],data:g,index:`branchId`,dataTree:_,printAsHtml:!0,printStyled:!1,onReady:()=>{let e=m.current;e&&y(e.getHtml())}})})]})}export{f as default};