import { Store } from '@storefront/flux-capacitor'; import { BaseService } from '../core/service'; import StoreFront from '../storefront'; export declare const STORAGE_KEY: string; declare class SearchService extends BaseService { constructor(app: StoreFront, opts: SearchService.Options); init(): void; /** * Stores the current search term, sends an event to hide sayt, and * pushes a search route to history. */ pushState(): void; /** * Stores the given search term in a cookie. * * @param term The term to store. * @return The list of search terms stored. */ pushSearchTerm(term: string): string[]; /** * Returns an array of past search terms. */ getPastSearchTerms(): string[]; /** * Fetches products based on the values in the given state. * * @param urlState The current history state. */ fetchProducts(urlState: Store.History): void; } declare namespace SearchService { interface Options { maxPastSearchTerms?: number; storeDuplicateSearchTerms?: boolean; } } export default SearchService;