import{n as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{a as n,c as r}from"./array-BBSjoTRy-CIRmlF93.js";function i(e){return r((Array.isArray(e)?e:[e]).filter(Boolean).join(` `))}function a({options:e,query:t,enabled:n=!0,getSearchText:a}){let s=r(t);return(0,o.useMemo)(()=>!n||!s?[...e]:e.filter(e=>i(a(e)).includes(s)),[n,a,s,e])}var o;function s(){return(s=e((()=>{o=t(),n()})))()}export{a as n,s as t};