import { CHAINS_LIST as i } from "../../constants/chains.js";
const C = (t) => {
  const { search: o } = t;
  return (e) => {
    if (!o)
      return !0;
    const c = e.name.toLowerCase(), a = e.symbol.toLowerCase(), r = e.contractAddress?.toLowerCase(), s = o.toLowerCase(), n = i[e.blockchain].label.toLocaleLowerCase();
    return (
      // search by chain name (only for external tokens)
      !e.isIntent && n.includes(s) || !e.isIntent && e.blockchain.includes(s) || // by token name
      c.includes(s) || a.includes(s) || // by contract address
      r && r === s
    );
  };
};
export {
  C as createFilterBySearch
};
//# sourceMappingURL=filterBySearchString.js.map
