import{computed as F}from"vue";import{fillLegacyProps as V}from"../utils/legacyUtil.mjs";const L=(a,d,{treeNodeFilterProp:h,filterTreeNode:l,fieldNames:v})=>F(()=>{const{children:s}=v.value,r=d.value,m=h?.value;if(!r||l.value===!1)return a.value;let o;if(typeof l.value=="function")o=l.value;else{const t=r.toUpperCase();o=(i,n)=>{const e=n[m];return String(e).toUpperCase().includes(t)}}function c(t,i=!1){const n=[];for(let e=0,g=t.length;e<g;e++){const u=t[e],C=u[s],p=i||o(r,V(u)),f=c(C||[],p);(p||f.length)&&n.push({...u,[s]:f})}return n}return c(a.value)});export{L as default};
