function e(t){return!t||typeof t!="object"?String(t||""):t.type==="doc"&&Array.isArray(t.content)?t.content.map(n=>r(n)).join(`

`):JSON.stringify(t,null,2)}function r(t){if(!t)return"";if(t.type==="text")return t.text||"";if(t.type==="paragraph"&&Array.isArray(t.content)||t.type==="heading"&&Array.isArray(t.content))return t.content.map(r).join("");if(t.type==="bulletList"&&Array.isArray(t.content))return t.content.map(n=>`\u2022 ${r(n)}`).join(`
`);if(t.type==="orderedList"&&Array.isArray(t.content))return t.content.map((n,i)=>`${i+1}. ${r(n)}`).join(`
`);if(t.type==="listItem"&&Array.isArray(t.content))return t.content.map(r).join("");if(t.type==="codeBlock"&&Array.isArray(t.content)){let n=t.content.map(r).join("");return`\`\`\`${t.attrs?.language||""}
${n}
\`\`\``}return Array.isArray(t.content)?t.content.map(r).join(""):""}export{e as adfToText};
