function m(r){let n=[],a=(e,s=null,y=!1)=>{let{children:t,opening:i,closing:c,movement:o,name:l,code:d}=e;n.push({code:d,accountName:l,openingDepiBalance:i?.depit??0,openingCreditBalance:i?.credit??0,closingCreditBalance:c?.credit??0,closingDepitBalance:c?.depit??0,movementDepitBalance:o?.depit??0,movementCreditBalance:o?.credit??0}),Array.isArray(t)&&t.forEach(p=>a(p,e.id,!0))};return r.forEach(e=>a(e)),n}export{m as a};
