import React from "react";
import { Config, ConfigRedirect, ReactivesearchResultProps } from "../types";
import { Flags } from "./useFlags";
export type ReactifySearchMode = "search" | "collection" | "instant-search";
export declare const ReactifySearchContext: React.Context<{
    config: Config;
    options: {
        clientId: string;
        mode: ReactifySearchMode;
        index: string;
        shopifyPermanentDomain: string;
        market?: string;
        filtersHandle?: string;
        credentials?: string;
        onRedirect?: (type: "redirect" | "search", url: string) => void;
        theme: Record<string, unknown>;
        additionalComponentIds?: Array<string>;
        includeFields?: Array<string>;
        excludeFields?: Array<string>;
        flags?: Record<Flags, boolean>;
        query?: Record<string, string>;
        preload?: {
            config: Config;
            state: unknown;
        };
    } & ({
        mode: "search";
    } | {
        mode: "collection";
        collectionHandle: string;
    } | {
        mode: "instant-search";
    });
    search: {
        searchTerm: string;
        setSearchTerm: React.Dispatch<React.SetStateAction<string>>;
        showInstantSearchResults: boolean;
        setShowInstantSearchResults: React.Dispatch<React.SetStateAction<boolean>>;
        searchRedirect: ConfigRedirect | undefined;
    };
    sortby: {
        sortOption: string;
        setSortOption: React.Dispatch<React.SetStateAction<string>>;
    };
    results: {
        results: ReactivesearchResultProps["data"];
        setResults: React.Dispatch<React.SetStateAction<ReactivesearchResultProps["data"]>>;
        resultStats?: ReactivesearchResultProps["resultStats"];
        setResultStats: React.Dispatch<React.SetStateAction<ReactivesearchResultProps["resultStats"] | undefined>>;
    };
} | undefined>;
export declare const useReactifySearchContext: () => {
    config: Config;
    options: {
        clientId: string;
        mode: ReactifySearchMode;
        index: string;
        shopifyPermanentDomain: string;
        market?: string;
        filtersHandle?: string;
        credentials?: string;
        onRedirect?: (type: "redirect" | "search", url: string) => void;
        theme: Record<string, unknown>;
        additionalComponentIds?: Array<string>;
        includeFields?: Array<string>;
        excludeFields?: Array<string>;
        flags?: Record<Flags, boolean>;
        query?: Record<string, string>;
        preload?: {
            config: Config;
            state: unknown;
        };
    } & ({
        mode: "search";
    } | {
        mode: "collection";
        collectionHandle: string;
    } | {
        mode: "instant-search";
    });
    search: {
        searchTerm: string;
        setSearchTerm: React.Dispatch<React.SetStateAction<string>>;
        showInstantSearchResults: boolean;
        setShowInstantSearchResults: React.Dispatch<React.SetStateAction<boolean>>;
        searchRedirect: ConfigRedirect | undefined;
    };
    sortby: {
        sortOption: string;
        setSortOption: React.Dispatch<React.SetStateAction<string>>;
    };
    results: {
        results: ReactivesearchResultProps["data"];
        setResults: React.Dispatch<React.SetStateAction<ReactivesearchResultProps["data"]>>;
        resultStats?: ReactivesearchResultProps["resultStats"];
        setResultStats: React.Dispatch<React.SetStateAction<ReactivesearchResultProps["resultStats"] | undefined>>;
    };
};
