import { renderBodyHtml } from './md.js';
export async function renderDocx(markdown, meta) {
    const bodyHtml = renderBodyHtml(markdown, false);
    const { default: HtmlToDocx } = await import('@turbodocx/html-to-docx');
    const docx = await HtmlToDocx(bodyHtml, undefined, {
        title: meta.title || 'Untitled',
        margins: { top: 1440, right: 1440, bottom: 1440, left: 1440 },
    });
    return Buffer.from(docx);
}
