import { Placement } from "@floating-ui/dom";
import { KlevuQueryResult, KlevuRecord, KlevuSearchSorting, KMCRootObject, KMCMapsRootObject, KlevuBanner } from "@klevu/core";
import { EventEmitter } from "../../stencil-public-runtime";
import { KlevuSearchFieldCustomEvent, KlevuTextfieldCustomEvent, ViewportSize } from "../../components";
import { KlevuProductOnProductClick } from "../klevu-product/klevu-product";
import { SearchFieldVariant, SearchResultsEventData, SuggestionsEventData } from "../klevu-search-field/klevu-search-field";
export type KlevuQuicksearchResultVarint = "simple" | "full";
export type KlevuQuicksearchDataEvent = {
  trendingProducts?: KlevuRecord[];
  lastClickedProducts?: KlevuRecord[];
  searchResult?: KlevuQueryResult;
};
type NoResultsOptions = KMCRootObject["klevu_uc_userOptions"]["noResultsOptions"];
type Banner = NoResultsOptions["banners"][0];
/**
 * Full app to create search bar that popups trending products and search results.
 *
 * @slot content - Popup content
 * @slot search-products - Slot to replace search results listings
 * @slot trending-products - Slot to replace trending products listings
 * @slot last-clicked-products - Slot to replace last clicked products
 * @slot noResults - Show message when no results found
 * @slot topbanners - Top banner content
 * @slot bottombanners - Bottom banner 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 Popular products section
   */
  popularProductsCount: number;
  /**
   * How many products to show in full variant
   */
  fullResultCount: number;
  /**
   * Enable Klevu MOI chat
   */
  enableChat?: boolean;
  /**
   * Title of search results
   */
  tSearchResults: any;
  /**
   * Title of button to start Moi session
   */
  tStartChat: any;
  /**
   * Title of categories section
   */
  tCategoriesCaption: any;
  /**
   * Trending tab caption
   * Supports showing the count in place of %s in the value
   * eg: `Trending (%s)` with count of 2 will lead to `Trending (2)`.
   */
  tTrendingCaption?: string;
  /**
   * Popular products section heading
   */
  tPopularProductsTitle?: string;
  /**
   * Recently clicked tab caption
   * Supports showing the count in place of %s in the value
   * eg: `Recently Searched (%s)` with count of 2 will lead to `Recently Searched (2)`.
   */
  tLastClickedProductsCaption?: string;
  /**
   * Show ratings
   */
  showRatings?: boolean;
  /**
   * Show ratings count
   */
  showRatingsCount?: boolean;
  /**
   * Hide trending products
   */
  hideTrendingProducts?: boolean;
  /**
   * Hide recently viewed products
   */
  hideRecentlyViewedProducts?: boolean;
  /**
   * Hide popular keywords
   */
  hidePopularSearches?: boolean;
  /**
   * Hide recent searches
   */
  hideRecentSearches?: boolean;
  /**
   * Enable personalisation
   */
  usePersonalisation?: boolean;
  /**
   * Enables Klaviyo click tracking
   */
  useKlaviyo?: boolean;
  /**
   * Hide popular keywords on no results page
   */
  hidePopularKeywordsOnNoResultsPage?: boolean;
  /**
   * Popular products section heading shown on no results page
   */
  tPopularProductsTitleOnNoResultsPage?: string;
  /**
   * HHide trending products on no results page
   */
  hideTrendingProductsOnNoResultsPage?: boolean;
  /**
   * Pass your own redirect urls for a keyword
   */
  urlRedirects?: KMCMapsRootObject["klevu_keywordUrlMap"];
  /**
   * Enable image search feature
   */
  enableImageSearch: boolean;
  products?: KlevuRecord[];
  trendingProducts: KlevuRecord[];
  suggestions: string[];
  cmsPages?: KlevuRecord[];
  categories?: KlevuRecord[];
  queryResult?: KlevuQueryResult;
  searchSort?: KlevuSearchSorting;
  lastClickedProducts?: KlevuRecord[];
  activeTab: "trending" | "last" | "";
  chat: boolean;
  noResultsMessage: string;
  noResultsBannerDetails: Banner[];
  searchResultTopBanners: KlevuBanner[];
  searchResultBottomBanners: KlevuBanner[];
  isUploadingImage: boolean;
  popup?: HTMLKlevuPopupElement;
  /**
   * When the data in the component changes. This event can be used to replace
   * whole rendering of products when used with slots properly.
   */
  klevuData: EventEmitter<KlevuQuicksearchDataEvent>;
  /**
   * When user clicks search button. Returns the search term.
   * This event is emitted when there is no url matched for redirects
   */
  klevuSearch: EventEmitter<string>;
  /**
   * This event is emitted once the image to be used for search is
   * uploaded. The event contains the url to be passed to search api.
   */
  klevuImageSearch: EventEmitter<string>;
  /**
   * Will be emitted when there is a url match for redirects.
   * You can override the default behaviour of redirects by
   * preventing default of this event
   */
  klevuRedirect: EventEmitter<KMCMapsRootObject["klevu_keywordUrlMap"][0]>;
  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;
  onKlevuSearchclick(event: CustomEvent<string>): void;
  connectedCallback(): Promise<void>;
  currentViewPortSize?: ViewportSize;
  viewportUtil: HTMLKlevuUtilViewportElement;
  render(): any;
}
export {};
