import { buildSearch } from '../../../../controllers/commerce/search/headless-search.js';
/**
 * Defines a `DidYouMean` controller instance.
 * @group Definers
 *
 * @param options - The configurable `DidYouMean` options.
 * @returns The `DidYouMean` controller definition.
 */
export function defineDidYouMean(options) {
    return {
        search: true,
        build: (engine) => buildSearch(engine, { enableResults: options?.enableResults }).didYouMean(),
    };
}
