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