/** * @license MIT * @module @whoj/utils-vue@2.4.0 * @copyright (c) 2026 Jonson B. */ import { Ref, ComputedRef } from 'vue'; import Fuse from 'fuse.js'; type FuseOptions = Fuse.IFuseOptions; type FuseResult = Fuse.FuseResult; type MaybeReactive = Ref | Array | Ref> | Ref> | ComputedRef>; declare class FuseJS { /** * @type Ref */ fuse: Ref>; /** * @type Ref */ resultsRaw: Ref[]>; /** * @type ComputedRef */ results: ComputedRef>; /** * @type Ref */ search: Ref; /** * @type ComputedRef */ noResults: ComputedRef; /** * @param items * @param options */ /** * It takes an array of items and an optional FuseOptions object, and then it creates a new Fuse instance with those * items and options, and then it runs the search with the current search value * @param items - DataT[] - The items to search through. * @param options - FuseOptions */ loadItems(items: DataT[], options?: FuseOptions): void; /** * If there is no search string, clear the results. Otherwise, search the fuse * @param {string} [search] - The search string to use. * @returns The results of the search. */ runSearch(search?: string): void; /** * We create a new Fuse instance with the list of items and options, and then we create a computed property that returns * the results of the search * @param list - This is the list of items that you want to search. It can be an array of items, or a reactive object * that contains an array of items. * @param options - FuseOptions */ constructor(list: MaybeReactive, options?: FuseOptions); } /** * It takes a list of data and an optional options object, and returns a FuseJS object that can be used to search the list * @param list - The list of data to search through. * @param [options] - FuseOptions * @returns A new instance of the FuseJS class. * * @__NO_SIDE_EFFECTS__ */ declare function useFuseJs(list: MaybeReactive, options?: FuseOptions): FuseJS; export { FuseJS, useFuseJs }; export type { FuseOptions, FuseResult, MaybeReactive };