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