import { Placement } from "@floating-ui/dom";
import { KlevuQueryResult, KlevuRecord, KlevuSearchSorting } from "@klevu/core";
import { KlevuSearchFieldCustomEvent, KlevuTextfieldCustomEvent } from "../../components";
import { KlevuProductOnProductClick, KlevuProductSlots } from "../klevu-product/klevu-product";
import { SearchFieldVariant, SearchResultsEventData, SuggestionsEventData } from "../klevu-search-field/klevu-search-field";
export type KlevuQuicksearchResultVarint = "simple" | "full";
/**
 * Full app to create search bar that popups trending products and search results.
 *
 * @slot content - Popup content
 */
export declare class KlevuQuicksearch {
  #private;
  /**
   * What term should be used if there isn't enough results
   */
  fallbackTerm?: string;
  /**
   * Anchor popup to witch side
   */
  popupAnchor?: Placement;
  /**
   * Should component search for categories too
   */
  searchCategories?: boolean;
  /**
   * Should component search for CMS pages too
   */
  searchCmsPages?: boolean;
  /**
   * Placeholder for input text
   */
  placeholder?: string;
  /**
   * Text of search button
   */
  searchText?: string;
  /**
   * Change variant of the search field
   */
  searchFieldVariant: SearchFieldVariant;
  /**
   * Change variant of the search results
   */
  resultVariant: KlevuQuicksearchResultVarint;
  /**
   * How many products to show in simple variant
   */
  simpleResultCount: number;
  /**
   * How many products to show in full variant
   */
  fullResultCount: number;
  /**
   * Enable Klevu MOI chat
   */
  enableChat?: boolean;
  /**
   * Function to render custom products. Result has to be native HTML element or a string. Provides a product being rendered.
   * This function is called for each slot (top, image, info and bottom) of the component. Second parameter provides
   * slot requested. Return null for slots that you do not want to render.
   */
  renderProductSlot?: (product: KlevuRecord, productSlot: KlevuProductSlots) => HTMLElement | string | null;
  products?: KlevuRecord[];
  trendingProducts: Array<KlevuRecord | undefined>;
  suggestions: string[];
  cmsPages?: KlevuRecord[];
  categories?: KlevuRecord[];
  queryResult?: KlevuQueryResult;
  searchSort?: KlevuSearchSorting;
  lastClickedProducts?: KlevuRecord[];
  activeTab: "trending" | "last";
  chat: boolean;
  popup?: HTMLKlevuPopupElement;
  onTextChange(event: KlevuTextfieldCustomEvent<string>): Promise<void>;
  onResults(event: KlevuSearchFieldCustomEvent<SearchResultsEventData>): Promise<void>;
  onSuggestions(event: KlevuSearchFieldCustomEvent<SuggestionsEventData>): Promise<void>;
  onProductClick(event: KlevuSearchFieldCustomEvent<KlevuProductOnProductClick>): void;
  onChatLayoutClose(): void;
  connectedCallback(): Promise<void>;
  render(): any;
}
